L=[[a,b],[c,d],[e,f],...]
我想按max(a,b),max(c,d),max(e,f)等对它进行排序。
您可以提供自定义key
函数来sort
:
L.sort(key=max)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.