understanding nested lists?

2009-01-24 Thread Vincent Davis
I have a short peace of code that is not doing what I expect. when I assign a value to a list in a list alist[2][4]=z this seems replace all the 4 elements in all the sub lists. I assume it is supposed to but this is not what I expect. How would I assign a value to the 4th element in the 2nd

Re: understanding nested lists?

2009-01-24 Thread Steve Holden
Vincent Davis wrote: I have a short peace of code that is not doing what I expect. when I assign a value to a list in a list alist[2][4]=z this seems replace all the 4 elements in all the sub lists. I assume it is supposed to but this is not what I expect. How would I assign a value to the 4th

Re: understanding nested lists?

2009-01-24 Thread Brian Allen Vanderburg II
vinc...@vincentdavis.net wrote: I have a short peace of code that is not doing what I expect. when I assign a value to a list in a list alist[2][4]=z this seems replace all the 4 elements in all the sub lists. I assume it is supposed to but this is not what I expect. How would I assign a value

Re: understanding nested lists?

2009-01-24 Thread Vincent Davis
Thanks for the info. I did not know that. Thanks Vincent Davis On Sat, Jan 24, 2009 at 10:46 AM, Steve Holden st...@holdenweb.com wrote: Vincent Davis wrote: I have a short peace of code that is not doing what I expect. when I assign a value to a list in a list alist[2][4]=z this seems