return list dictionary of the two biggest numbers in a list of dictionaries
def return_biggest_numbers(num_list): num_list.sort(key=lambda x:x["number"], reverse=True) return num_list[:2] return_biggest_numbers([{"number":1},{"number":100},{"number":50}])