x=['0100', '1111', '1001', '1011']
y=x
y.remove('0100')
print(x)
the code above returns:['1111', '1001', '1011']
I am a begginer programmer and I want to know why the remove()
function also modifies the x list instead of the intended y list? The code is run in python 3.4.2. How do I fix this so that only the y list will be modified?