Use the MutableString class in the UserString module:

   1 >>> from UserString import MutableString
   2 >>> s = MutableString('python')
   3 >>> s[2:4] = 'l'
   4 >>> print s
   5 pylon

How to have a mutable buffer with python 2.3? (last edited 2008-11-15 13:59:37 by localhost)

Unable to edit the page? See the FrontPage for instructions.