>>> lista=[[12,13],[0,1]]
>>> lista
[[12, 13], [0, 1]]
>>> lista[0]=lista[1]
>>> lista
[[0, 1], [0, 1]]
>>> lista[0][0]+=10
>>> lista
[[10, 1], [10, 1]]
What i expect to happen is to last output be like:
[[10, 1], [0, 1]]
but instead it behaves as if I typed:
lista[0][0]+=10
lista[1][0]+=10
instead of just
lista[0][0]+=10
i think the problem is with this part:
lista[0]=lista[1]
because when i type instead
lista[0]=list(lista[1])
it works just fine. Why is that?