how to get index of a 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"]