Diez B. Roggisch: > That's the price to pay for immutable strings. Right, but CPython has array.array("c") too. Using Diez Roggisch's code:
>>> from array import array >>> arrs = array("c", "010203040506") >>> arrs[:2], arrs[4:5] = arrs[4:6], arrs[:2] >>> arrs.tostring() '0302013040506' Using such arrays is useful if you have to do lot of processing before the final tostring(). Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list