Can someone explain to me what the hell is going on here:
>>> listOne=[1,2,3,4]
>>> listOne
[1, 2, 3, 4]
>>> listTwo=listOne
>>> listTwo
[1, 2, 3, 4]
>>> listTwo[0]=0
>>> listTwo
[0, 2, 3, 4]
>>> listOne
[0, 2, 3, 4]
I've been quite clear I only want to change the first element of the list listTwo, but clearly listOne has remained linked to it and is edited also. There is nothing in the documentation about the equals operator that I can find that explains this...
I can of course fix it by turning listOne into a tuple after the assignment to listTwo.