Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
L=[[a,b],[c,d],[e,f],...]
我想按 max(a,b)、max(c,d)、max(e,f) 等对其进行排序。
您可以提供自定义key函子sort:
key
sort
L.sort(key=max)