Mutable String

Scott David Daniels scott.daniels at acm.org
Wed May 3 18:38:44 EDT 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