Return to Snippet

Revision: 26936
at May 17, 2010 08:03 by magicrebirth


Initial Code
You could use:

sorted(dictionaryObject.items(), key=lambda x: x[1] )

Initial URL

                                

Initial Description
Dictionaries cant be sorted, so you need to transform it into a list and sort that one!

Initial Title
sorting a dictionary

Initial Tags
sort

Initial Language
Python