我想要一个二维数组,第一个参数是学生的名字,第二个是他的结果。你知道吗
我试试这个:
listStudentResult = []
listStudentResult.append([])
listStudentResult[0].append("Alex")
listOfasinEan[0].append(20)
lisStudentResult.append([])
listStudentResult[1].append(Paul)
listStudentResult[1].append(15)
我怎么知道亚历克斯的结果?
我不要listStudentResult[0][1]
我需要这样的东西
listStudentResult[0]["Alex"]
使用词典:
复杂类:
简单类:
示例:
通过查看您的需求,我建议您使用python词典。你知道吗
为了解释这本词典,我将以你为例
可以使用listStudentResult['Alex']访问元素。你知道吗
相关问题 更多 >
编程相关推荐