'Item' is a string in our code. The string indices are the characters inside the square brackets. First you must check your data variable to see what you receive.
For example, the following code shows an error-
***>>> my_string = "hello world"
>>> my_string[0,5]***
'TypeError:' string indices should be integers. We passed a tuple of two integers implicitly here, from 0 to 5 to the slice notation where we called 'my_string[0,5] as 0,5 evaluates to the same tuple as (0,5) does. We need to replace the comma with a colon in order to separate two integers correctly-
Like here, the code goes as-
***>>> my_string = "hello world"
>>> my_string[0:5]
'hello'***