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