I have the following code:
myList = ['A','B','C']
for letter in myList:
letter = myList
When running it I would expect variables to be assigned as following:
A = ['A', 'B', 'C']
B = ['A', 'B', 'C']
C = ['A', 'B', 'C']
Instead it seems that the loop is only assigning values to the "myList" component of the loop and forgetting to assign the anything for "letter". Hence the actual variable assignment looks like this:
letter = ['A', 'B', 'C']
Can someone please explain to me why python does not replace "letter" with values from "myList"?
Thank you!