- 1
python list
how do u do this ........The index method finds the first occurrence of a list item and returns its index. If the item isn't in the list, it raises a ValueError.
1 Answer
+ 1
your_list.index(your_list_item)
how do u do this ........The index method finds the first occurrence of a list item and returns its index. If the item isn't in the list, it raises a ValueError.