I’m Learning Python (part 5)
I’m Learning Python (part 5) <p> <img title="Python Logo" src="http://www.python.org/images/python-logo.gif" alt="Python Logo" /> </p> String Is Immutable? Last time I told you to try to change a specified character, you must have failed if you tried: >>> s[0] = ‘c’ The error you’d get is: TypeError: ‘str’ object does not support item assignment This means that strings are immutable, so are core-types, numbers and tuples, they can’t be changed, while lists and dictionaries can be changed freely. ...