I have a list of lists: myList = [['make', 'Ford'], ['model', 'Mustang'], ['year', 1964]]
Would like to return a dictionary with key, value pairs dict={make:'Ford',model:'Mustang',......}
d ={}
for row in myList:
for col in row:
d[col]=row[1]
This returns the first key value pair correct {'make':'Ford','Ford':'Ford','model':'Mustang','Mustang':'Mustang'...}
but then it repeats the second value.