python字典排序

dic = {'a':31, 'bc':5, 'c':3, 'asd':4, '33':56, 'd':0}

sorted(dic.iteritems(), key=lambda d:d[1], reverse = False )

posted on 2011-05-31 12:48  xuq  阅读(125)  评论(0编辑  收藏  举报

导航