how to print all items in a list that matches a given item in a list in python code example
Example 1: get all indices of a value in list python
indices = [i for i, x in enumerate(my_list) if x == "whatever"]
Example 2: python index for all matches
indices = list(filter(lambda x: x == 'whatever', my_list))