list vs tuple
Rikard Bosnjakovic
bos at hack.org
Sun Apr 1 06:44:06 EDT 2001
deadmeat wrote:
> > a is still [1, 2, 3]. What's the problem?
> b = a still didn't duplicate a
It never would, unless you _TELL_ Python to duplicate a. That is, "b =
a[:]".
> as would have been expected
That's why you should read the manual and first line on Fredrik's page:
Reset your brain.
--
Rikard Bosnjakovic - http://a214.ryd.student.liu.se/cv/ - ICQ: 1158217
Anyone sending unwanted advertising e-mail to my address will be
charged $250 for network traffic and computing time. By extracting my
address from this message or its header, you agree to these terms.
More information about the Python-list
mailing list