Cody Bable

Generation

generate functionFri, 30 Jun 2023

return the two biggest numbers in a list of dictionaries

def two_biggest(l): pass l = [ {'id': 5, 'value': 5}, {'id': 2, 'value': 2}, {'id': 3, 'value': 3}, {'id': 4, 'value': 4}, {'id': 9, 'value': 9}, {'id': 1, 'value': 1} ] two_biggest(l)

Questions about programming?Chat with your personal AI assistant