Dennis Lee Bieber wrote: > On 26 Apr 2006 01:13:20 -0700, "Licheng Fang" <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > > > > Could anybody please explain to me why three values were change? I'm > > bewildered. Thanks! > > http://www.aifb.uni-karlsruhe.de/Lehrangebot/Winter2000-01/E-Shop/Python/Doku/The%20Whole%20Python%20FAQ.htm#4.50 > -- > > ============================================================== < > > [EMAIL PROTECTED] | Wulfraed Dennis Lee Bieber KD6MOG < > > [EMAIL PROTECTED] | Bestiaria Support Staff < > > ============================================================== < > > Home Page: <http://www.dm.net/~wulfraed/> < > > Overflow Page: <http://wlfraed.home.netcom.com/> <
Thank you very much! But I still wonder why a nested assignment "a = [[0]*3]*3" generates 3 references to the same list, while the commands below apparently do not. >>> a = [0] * 2 >>> a [0, 0] >>> a[0] = 1 >>> a [1, 0] -- http://mail.python.org/mailman/listinfo/python-list