Cody Bable

Generation

generate functionFri, 30 Jun 2023

return list dictionary of the two biggest numbers in a list of dictionaries

def get_two_largest_numbers(some_list): # ... return [max_1, max_2] get_two_largest_numbers([{'name': 'sam', 'number': 1}, {'name': 'max', 'number': 2}])

Questions about programming?Chat with your personal AI assistant