is list always with reference ?
pyth at devel.trillke.net
Tue Aug 27 10:24:54 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 ? What I want to know is if all modifications on list1 will affect list2 ? I say "All" here.
yes, they will. It often helps if you fire up the python commandline:
[hpk at cobra pythonics]$ python
Python 2.2.1 (#1, Aug 20 2002, 17:44:37)
[GCC 2.95.3 20010315 (release)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
[1, 2, 3, 4]
More information about the Python-list