标签: python list
L=[[a,b],[c,d],[e,f],...]
我想按max(a,b),max(c,d),max(e,f)等对其进行排序。
答案 0 :(得分:13)
您可以向key提供自定义sort仿函数:
key
sort
L.sort(key=max)