Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get the key with the maximum value in a dictionary
some_dict = {'one': 1, 'two':2, 'three': 3480394803840, 'four': 4}
max_key = max(some_dict, key=some_dict.get)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.