OverIQ.com
Run (or Hit F9)
list1 = [1, 2, 3, 4, 5, 6, 1, 2, 3] print(list1.index(1)) # index of first occurrence of element 1 print(list1.index(3)) # index of first occurrence of element 3 # list1.index(90) # an exception is raised, as value 90 doesn't exists in the list