a = {"a":1, "c":2, "b":3, "d":0}b = a.keys()b.sort( key = a.__getitem__ )print b结果:['d', 'a', 'c', 'b']