python有自带的排序sorted函数,而且用reverse =True or False,来控制降序还是升序.但是如果有多个条件需要排序应该如何办呢? L = [(12, 12), (34, 13), (32, 15), (12, 24), (32, 11), (32, 11)] L.sort(key=lambda x: (x[0], -x[1]),reverse=True) print(L) 结果: [(34, 13), (32, 11), (32, 11), (32, 15), (12,