Simple object reference

AON LAZIO aonlazio at
Sun Nov 15 00:25:07 CET 2009

Hi, I have some problem with object reference
Say I have this code

a = b = c = None
slist = [a,b,c]
for i in range(len(slist)):
slist[i] = 5
print slist
print a,b,c

I got this
[5, 5, 5]
None None None

    Question is how can I got all a,b,c variable to have value 5 also?
    Thanks in advance
Passion is my style
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list