I have a code as below:
v={'B', 'C', 'a', 'f', 'g', 'c', 'd'}
u=v
t={'B', 'C','H'}
u|=t
print v,u
It gives this result:
set(['a', 'C', 'B', 'd', 'g', 'f', 'H', 'c']) set(['a', 'C', 'B', 'd', 'g', 'f', 'H', 'c'])
Why on Earth would line 4 change v?? I only expect u to change. I would understand if I would write v=u, but not other way.