how to find index of an item in list python code example
Example 1: get index of list python
list.index(element)
Example 2: get index of all element in list python
indices = [i for i, x in enumerate(my_list) if x == "whatever"]
list.index(element)
indices = [i for i, x in enumerate(my_list) if x == "whatever"]