Problem with assigning variables of type List
mwh at python.net
Mon Aug 19 13:19:15 CEST 2002
abhishek at ocf.berkeley.edu (Abhishek Roy) writes:
> It appears that,
> a = b = 
> is not the same as
> because in the previous case a and b will refer to the same list eg,
> >>> b.append(23)
> >>> a
> I am completely baffled by this. Can someone please explain?
You could read this:
ARTHUR: Why should a rock hum?
FORD: Maybe it feels good about being a rock.
-- The Hitch-Hikers Guide to the Galaxy, Episode 8
More information about the Python-list