is list always with reference ?
wurmy at earthlink.net
Tue Aug 27 20:17:20 CEST 2002
quite black wrote:
> when we build up a list(for example named list1) and write this line:
> So, list2 is reference with list1, alright ?
Sort of. list1 and list2 are names for the same object. This is true for all
Python objects, by the way, not just lists.
> What I want to know is if
> all modifications on list1 will affect list2 ? I say "All" here.
Yes, since they are the same object.
# decode for email address ;-)
The Pythonic Quarter:: http://www.awaretek.com/nowak/
More information about the Python-list