Mutable String

Scott David Daniels scott.daniels at acm.org
Thu May 4 00:38:44 CEST 2006


Pierre Thibault wrote:
> I would like to know if there are modules offering a mutable version of
> strings in Python?

Nope.  But, for some uses:
     import array
     stringish = array.array{'c', 'Whatever, kiddo!')
     stringish[-6:-1] = array.array('c', 'dudes')
     print stringish.tostring()
-- 
-Scott David Daniels
scott.daniels at acm.org



More information about the Python-list mailing list