Skip to content

Instantly share code, notes, and snippets.

@lambdaman2
Created October 1, 2012 12:48
Show Gist options
  • Save lambdaman2/3811581 to your computer and use it in GitHub Desktop.
Save lambdaman2/3811581 to your computer and use it in GitHub Desktop.
Python: sorting a dictionary
You could use:
sorted(dictionaryObject.items(), key=lambda x: x[1] )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment