你的意思是这样的吗? 问候 Steve - Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.com PyCon TX 2006 www.python.org/pycon/ 是的......这个想法...... I have two lists.I want to sort by a value in the first list and have the second listsorted as well... Any suggestions on how I should/could do this? 解决方案 I guess you mean that you have two lists of same size where each indexposition pointing to corrsponding items - like two excel columns? Thenthis helps: sl = zip(list_a, list_b)sl.sort()list_a, list_b = unzip(*sl) Regards, Diez You mean like this? regardsSteve--Steve Holden +44 150 684 7255 +1 800 494 3119Holden Web LLC www.holdenweb.comPyCon TX 2006 www.python.org/pycon/ 这篇关于我该如何排序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-23 05:54