Python2.4以上对字典按值大小进行排序:for k, v in sorted(myDict.items(), key=lambda x: x[1], reverse=True): print k,v