diguList = [(4, 'john'), (7, 'steve'), (2, 'alice')] sorted(diguList, key=lambda diguId:diguId[0], reverse=True) # 结果:diguList = [(7, 'steve'), (4, 'john'), (2, 'alice')]
diguList = [(4, 'john'), (7, 'steve'), (2, 'alice')] sorted(diguList, key=lambda diguId:diguId[0], reverse=True) # 结果:diguList = [(7, 'steve'), (4, 'john'), (2, 'alice')]