Hi all,
I am trying to get myself familiar with zip function and turns out Key error 1 keeps popping up when i typed the following program.
I seriously have no idea what's wrong in this program...
I am trying to get myself familiar with zip function and turns out Key error 1 keeps popping up when i typed the following program.
I seriously have no idea what's wrong in this program...
a = {}
b = 'hello'
data = '1','2','3'
date = '24','25','26'
for c, d in zip(data, date):
a[c][d] = [b]Error:Traceback (most recent call last):
File "/Users/Larry/Documents/Complicated Name List Testing.py", line 26, in <module>
a[c][d] = [b]
KeyError: '1'
