return list dictionary of the two biggest numbers in a list of dictionaries
# input: [{'key':1},{'key':2},{'key':3}] # output: [{'key':3},{'key':2}] def largestTwo(dictionaries): return sorted(dictionaries, key=lambda item: item['key'], reverse=True)[:2]