Imagine a CSV that looks like
Zipcode State
0000 CA
0001 CA
I want to create a dictionary where the Key is the zipcode and the Value is the State.
I've already written a function that reads the CSV line by line,
for i, line in enumerate(reader):
print ('line[{}] = {}'.format(i, line))
output:
line[1] = ['0000', 'CA']
line[2] = ['0001', 'CA']
How do I take each line and make it an entry in dictionary?
Hoping for an output as return dict[zipcode]