animals = ['cat', 'dog', 'rabbit', 'horse'] index = animals.index('dog') print(index) #Output => 1
lst = [4, 6, 5] lst.index(6) # will return 1
list.index(element, start, end)