I'm trying to take two lists and use one list to make changes in the second list as the following code shows:
a = [1,2,3,4,5]
b = [0,0,0,0,0]
for aA, bB in zip(a,b):
bB = aA*4
print(b)
I get the result b = [0,0,0,0,0], I want b = [4,8,12,16,20]
I know that you shouldn't modify containers while iterating with a for loop. But is there any work-around in python to be able to get the intended result of modifying a container?