So I know Python strings are immutable, but I have a string:
c[\'date\'] = \"20110104\"
Which I would like to convert to
c[\'da
I'd probably do so this way, not that there's a great deal of gain:
d = c['date'] c['date'] = '%s-%s-%s' % (d[:4], d[4:6], d[6:])
The big improvement (imho) is avoiding string concatenation.