Skip to content

Instantly share code, notes, and snippets.

@Katharine
Created April 9, 2012 18:08
Show Gist options
  • Save Katharine/2345099 to your computer and use it in GitHub Desktop.
Save Katharine/2345099 to your computer and use it in GitHub Desktop.
def largest_key(d):
k = None
largest = 0
for i in d:
if d[i] > largest:
largest = d[i]
k = i
return k
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment