Find elements in lists in Python

Find the index of the first occurrence of a given value

>>> myList=["a","a","a","b","c","c"]
>>> myList.index('c')
4

See also


Last update : 10/11/2021