the source code is as follows

x={}
x['a'] = 11
x['c'] = 19
x['b'] = 13
print x

tmp = sorted(x.items(), key = lambda x:x[0])    #  increase order by
default, if i want to have a descending order, what should i do?
# after sorted is called, a list will be generated, and the hash list
x is not changed at all, how to convert x to a sorted hash list
without generating a new object?
print tmp
print x
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to