SyntaxFix
Write A Post
Hire A Developer
Questions
Here is another one:
stats = {'a':1000, 'b':3000, 'c': 100} max(stats.iterkeys(), key=lambda k: stats[k])
The function key simply returns the value that should be used for ranking and max() returns the demanded element right away.
key
max()