re python find all matches with index code example Example: python index for all matches indices = list(filter(lambda x: x == 'whatever', my_list))