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.
在对列表中的 2 个数字求和并根据该总和进行排序后,我需要对列表进行排序。列表如下..任何建议将不胜感激。
myList = [['X5QR76', 3, 7], ['G77652', 1, 5], ['GT1885', 5, 2], ['WB2013', 5, 2], ['FINBOX', 2, 9]]
sorted(myList,key=lambda x:x[1]+x[2])