[Tutor] Tuple - Immutable ?

Sudip Bhattacharya sudipb at sudipb.com
Thu Mar 8 12:11:57 CET 2012


>>> s=(1,2,3)
>>> s=s+(4,5,6)
>>>s
(1,2,3,4,5,6)

The tuple has changed.

I thought I read that tuples are sequences (like lists), but they are
immutable - They can't be changed once created. Could someone explain
please ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120308/a19ee8fc/attachment.html>


More information about the Tutor mailing list