I want to create a dictionary, assign it keys, then iterate through a for
loop and assign the dictionary values from a list. I'm trying this, but
it's not working:
dictionary = {"one", "two", "three"}
list = [1,2,3]
for key in dictionary:
for value in list:
dictionary[key] = value
I get this error:
TypeError: 'set' object does not support item assignment
What am I doing wrong? Any help is greatly appreciated.
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor