On 28/01/14 19:00, Denis Heidtmann wrote:
On Tue, Jan 28, 2014 at 12:28 AM, spir <denis.s...@gmail.com

This is getting confusing with two times Denis!

<mailto:denis.s...@gmail.com>> wrote:

                a = [1,[2,3]]

I think the above line is a mistake. If Denis(spir) had missed
this out his code would work as he describes, but with it he
reassigns 'a' to a new list and, as you say breaks the connection.

If you forget about that line and keep a pointing at the original [1,[1,2]] list then the following code makes sense.

                a[0] = 0
                b

    [0, [1, 2]]                  # this is where I get lost.

                a[1] = [0,0]
                b

    [0, [0, 0]]


My python gets a different result:

So does mine, and I suspect so does denis' (spir).
I think he made a mistake with the second assignment to a.

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to