我有一个列表的列表,我试图从列表中创建一本词典。我知道如何使用这种方法做到这一点。 Creating a dictionary with list of lists in PythonDict从列表清单中理解python
我想要做的就是使用第一个列表中的元素作为键构建列表,其余具有相同索引的项目将成为值列表。但我无法弄清楚从哪里开始。每个列表长度相同,但名单的长度变化
exampleList = [['first','second','third'],['A','B','C'], ['1','2','3']]
resultDict = {'first':['A','1'],'second':['B','2'],'third':['C','3']}
我刚刚添加的描述,因为名单的长度可以变化。 – mickNeill