使用max与key=sum
max
key=sum
例如:
data = [[1,2,3,4], [1,2,3,3], [1,1], [3,3,3,3,3,3]] print(max(data, key=sum))
输出:
[3, 3, 3, 3, 3, 3]