how to get all elements in a list python code example Example: find all element in list python indices = [i for i, x in enumerate(my_list) if x == "whatever"]