python if not in list of dictionaries