我在命名问题的标题时遇到了困难,因为您可以告诉..无论如何,要将问题放入一些上下文中:我有一个高分的文本文件,数据已放入列入清单。每个人的分数已经排序,所以他们现在从最低到最高排列。Python - 索引,比较和追加
data = [['Stuart', 'got', 'a', 'highscore', 'of:', '92'], [ 'Steve',
'got', 'a', 'highscore', 'of:', '53'], ['Andrew', 'got', 'a',
'highscore', 'of:', '73'], ['Luke', 'got', 'a', 'highscore',
'of:', '1'], [ 'Shaney', 'got', 'a', 'highscore', 'of:', '77'],
['Robert', 'got', 'a', 'highscore', 'of:', '33'], ['Moley',
'got', 'a', 'highscore', 'of:', '6'], [ 'Kev', 'got', 'a',
'highscore', 'of', '2322']]
numbers = [1, 6, 33, 53, 73, 77, 92, 2322]
temp = []
我的目标,以创建一个名为“TEMP”列表包含有序数据。 “有序数据”将是原始日期,但排列为['Luke', 'got', 'a', 'highscore', 'of:', '1']
将位于“温度”列表的开头。
像往常一样,任何反馈,将帮助我将不胜感激。
它只是被转换成一个整数。尽管非常感谢答复,但我真的很久以来都在努力想出来,非常感谢他。 – Shaney96 2015-02-07 18:14:46