On 09/07/2011 03:57 PM, Martin Rixham wrote:
Hi all
I would appreciate some help understanding something. Basically I am
confused by the following:
>>> a = [[0, 0], [0, 0]]
>>> b = list(a)
>>> b[0][0] = 1
>>> a
[[1, 0], [0, 0]]
I expected the last line to
On 07/09/2011 23:57, Martin Rixham wrote:
Hi all
I would appreciate some help understanding something. Basically I am
confused by the following:
>>> a = [[0, 0], [0, 0]]
>>> b = list(a)
>>> b[0][0] = 1
>>> a
[[1, 0], [0, 0]]
I expected the last line to
Hi all
I would appreciate some help understanding something. Basically I am
confused by the following:
>>> a = [[0, 0], [0, 0]]
>>> b = list(a)
>>> b[0][0] = 1
>>> a
[[1, 0], [0, 0]]
I expected the last line to be
[[0, 0], [0, 0]]
I hope that's clear e