1 - Check if an element exists in a list of dictionnaires
my_list = [
    {'main_color': 'red', 'second_color':'blue'},
    {'main_color': 'yellow', 'second_color':'green'},
    {'main_color': 'yellow', 'second_color':'blue'},
]
if not any(my_dict['main_color'] == 'red' for my_dict in my_list):
    # does not exist