[Tutor] Phython List values
Ayo Rotibi
ayodejirotibi at aol.com
Mon Nov 18 07:57:20 CET 2013
Hi,
I am a complete newbie to python.
I read that an assignment with an = on lists does not make a copy. Instead,
assignment makes the two variables point to the one list in memory. For
instance, if a = [1, 2, 3] and b=a, then b = [1, 2, 3].
However, I discovered that if I change the value in 'a', 'b' does not take
the new value. I thought since it is pointing to the same storage as 'a',
'b' should take the new value.
Any explanation would be appreciated.
Ayo
_________________________________
Desire, Dedication, Determination
and a little bit of Talent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20131118/59d3b0c1/attachment-0001.html>
More information about the Tutor
mailing list