Individual characters of strings are not assignable

suggest change
foo = "bar"
foo[0] = "c" # Error

That assignment raises TypeError: 'str' object does not support item assignment. The string object cannot be changed after it is created. The name foo can still be bound to a different string.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents