On Wed, 27 Aug 2008 08:32:52 -0700, [EMAIL PROTECTED] wrote: > Thanks for your reply Simon. > > I will read the article you told me to but first, please, have a look at > this snippet:
Please read the article! >>>> m = [2,3,4] >>>> p = ['a','b','c'] >>>> q = [m,p] >>>> q > [[2, 3, 4, 'a', 'b', 'c'], ['a', 'b', 'c']] >>>> del p >>>> q > [[2, 3, 4, 'a', 'b', 'c'], ['a', 'b', 'c']] >>>> >>>> > > How come q is not updated after I deleted p? Because neither the name `q` nor the list object bound to it has anything to do with the name `p`. ``del`` does not delete objects but *names*. Objects exist as long as there is a reference to them. You deleted the name `p` and thus one reference to the list with the three characters but there's still the reference from the list bound to `q` to that three character list. What did you expect for an "updated q" anyway? Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list