Python Basic Posted on 2023-07-11 Edited on 2024-06-19 In Algorithm . sort 怎么让数组在第一维度正序,第二维度倒序 1li.sort(key = lambda x:(x[0],-x[1]),reverse=True)