list vs tuple

deadmeat root at [127.0.0.1]
Sat Mar 31 16:24:33 EST 2001


> THERE IS NO DIFFERENCE.

What happens to the objects is not the point, what happens to what I put
into a and b is the point.

>>> a = 1
>>> b = a
>>> a = 2
>>> b
1

>>> a = [1,2,3]
>>> b = a
>>> a[0] = 0
>>> b
[0, 2, 3]

Are you saying there is no difference (IN THE *RESULT*) between these?  Are
you able to read?

What goes on in the background is NOT THE POINT. I only care about the
values I put into them, and what happens after b = a.







More information about the Python-list mailing list