Cody Bable

Generation

generate functionFri, 30 Jun 2023

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

def three_biggest(list_of_dictionaries): return sorted(list_of_dictionaries, key=lambda k: k['num'])[-3:]

Questions about programming?Chat with your personal AI assistant