This function returns the index of the first element in the list that matches “elem.” If there is no “elem” in the list, you get an error.
list1 = [’a’, ‘b’, ‘c’, ‘d’, ‘b’]
i = list1.index(’b’)
i is set to 1 since ‘b’s first occurrence is in index 1