>>> s='355879ACB6' >>> s[4:4] = '-' Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'str' object does not support item assignment