+ 3
Hey whats the function of the index here?
4 Respostas
+ 4
The index function returns the position of a certain item inside a list.
Example:
————————————
# Create a list
list = ['a','b','c','d']
# Find a certain item in the list, in this case, the letter b
print(list.index('b'))
# Output
>>>1
# Info: 1 is returned because python counts list items from 0, not 1
————————————
Hope this helps 😊
+ 3
Thx so much man. I really appreciate it✌
+ 3
Glad to be of help 😊
+ 3
👍🤘