Skip to content

Instantly share code, notes, and snippets.

@prestontimmons
Created December 17, 2010 20:49
Show Gist options
  • Save prestontimmons/745682 to your computer and use it in GitHub Desktop.
Save prestontimmons/745682 to your computer and use it in GitHub Desktop.
Using lambda to sort a list of structured data in Python
# Using a lambda to sort a list of structured data in Python
sorted(list_o_stuff, key=lambda k: k.key)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment