dictionaries_list = [{'a': 5, 's': 45, 't': 10}, {'s': 5, 't': 6}, {'a': 2,
    's': 22, 't': 30}]
tuple_dict = {}
tuple_dict['s'] = [i[0][1] for i in tuple_list]
tuple_dict['t'] = [i[1][1] for i in tuple_list]
if some_parameter == 'something':
    m1_dicts = [d for d in dictionaries_list if d['s'] in tuple_dict['s']]
else:
    m1_dicts = [d for d in dictionaries_list if d['t'] in tuple_dict['t']]
How to efficiently filter data from list of dictionaries