Cody Bable

Generation

generate functionFri, 30 Jun 2023

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

def get_three_biggest(dic_list): sorted_list = sorted(dic_list, key=lambda x: x['number'])[::-1] return sorted_list[:3]

Questions about programming?Chat with your personal AI assistant