Re: I am confused by

2011-09-07 Thread Gary Herron
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

Re: I am confused by

2011-09-07 Thread MRAB
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

I am confused by

2011-09-07 Thread Martin Rixham
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