return the two biggest numbers in a list of dictionaries
def get_two_biggest_numbers(a_list): biggest_number = a_list[0]['number'] second_biggest_number = a_list[0]['number'] for element in a_list: if element['number'] > biggest_number: biggest_number = element['number'] elif element['number'] > second_biggest_number: second_biggest_number = element['number'] return biggest_number, second_biggest_number