Re: multivariable assignment

2010-01-01 Thread Rainer Grimm
On Dec 31 2009, 5:13 pm, davidj411 wrote: > I am not sure why this behavior is this way. > at beginning of script, i want to create a bunch of empty lists and > use each one for its own purpose. > however, updating one list seems to update the others. > > >>> a = b = c = [] > >>> a.append('1') > >

Re: multivariable assignment

2010-01-01 Thread Lie Ryan
On 1/1/2010 3:13 AM, davidj411 wrote: I am not sure why this behavior is this way. at beginning of script, i want to create a bunch of empty lists and use each one for its own purpose. however, updating one list seems to update the others. a = b = c = [] a.append('1') a.append('1') a.append('1'

Re: multivariable assignment

2009-12-31 Thread John Posner
On Thu, 31 Dec 2009 11:32:04 -0500, Andreas Waldenburger wrote: On Thu, 31 Dec 2009 08:13:35 -0800 (PST) davidj411 wrote: I am not sure why this behavior is this way. at beginning of script, i want to create a bunch of empty lists and use each one for its own purpose. however, updating one l

Re: multivariable assignment

2009-12-31 Thread Andreas Waldenburger
On Thu, 31 Dec 2009 08:13:35 -0800 (PST) davidj411 wrote: > I am not sure why this behavior is this way. > at beginning of script, i want to create a bunch of empty lists and > use each one for its own purpose. > however, updating one list seems to update the others. > > >>> a = b = c = [] No, y

Re: multivariable assignment

2009-12-31 Thread J
On Thu, Dec 31, 2009 at 11:13, davidj411 wrote: > I am not sure why this behavior is this way. > at beginning of script, i want to create a bunch of empty lists and > use each one for its own purpose. > however, updating one list seems to update the others. > a = b = c = [] a.append('1')

multivariable assignment

2009-12-31 Thread davidj411
I am not sure why this behavior is this way. at beginning of script, i want to create a bunch of empty lists and use each one for its own purpose. however, updating one list seems to update the others. >>> a = b = c = [] >>> a.append('1') >>> a.append('1') >>> a.append('1') >>> c ['1', '1', '1'] >