problem with sorting

ankitks.mital at gmail.com ankitks.mital at gmail.com
Fri Mar 28 06:38:48 CET 2008


>>> dict = {'M':3, 'R':0, 'S':2}
>>> print dict
{'S': 2, 'R': 0, 'M': 3}

now if I wanted sorted values in list, i am not able to do this
>>> print dict.values().sort()
None

it returns None instead of [0, 2, 3]




More information about the Python-list mailing list