Use the MutableString class in the UserString module: {{{#!python >>> from UserString import MutableString >>> s = MutableString('python') >>> s[2:4] = 'l' >>> print s pylon}}}