d = {'a':1,'b':4,'c':2}print(sorted(d.items(),key = lambda x:x[1],reverse = True))
输出
[('b', 4), ('c', 2), ('a', 1)]