Sort the values of a dict

Lie Ryan lie.1296 at gmail.com
Sat Dec 19 01:30:27 EST 2009


On 12/19/2009 9:34 AM, mattia wrote:
> Can you provide me a much pythonic solution (with comments if possible,
> so I can actually learn something)?

If you only need to get i'th element sometimes, sorting the dict is 
fine. Otherwise, you might want to use collections.OrderedDict.



More information about the Python-list mailing list