On Thu, Jul 16, 2009 at 11:22 AM, Gregor Lingl<gregor.li...@aon.at> wrote:

> That's simply not true in Python. Try it out!
>
>>>> word = "cat"
>>>> word[1] = "_"
> Traceback (most recent call last):
>  File "<pyshell#1>", line 1, in <module>
>   word[1] = "_"
> TypeError: 'str' object does not support item assignment

And the reason for that, undoubtedly, is that strings are immutable.


-- 
André Engels, andreeng...@gmail.com
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to