manipulate string

Chris llafba_NOSPAM_ at gmx.net
Tue Oct 28 11:56:49 EST 2003


I heard that strings are immutable, but isn't there regardless a way to 
manipulate a string?
I have a string that looks like this:
a = '0123456789'
But I want it to look like this:
a = '0 - 2 - 4 - 6 - 8 - '
I want whitespace between every number and I want to fade out every 
second number.
It is funny that I can explicitly read parts of that string, print a[3] 
works perfectly, but I can't remove it, delete it or what ever.

I would appreciate any hint on how to solve my little "problem".

Thanks a lot.
Regards, Tom





More information about the Python-list mailing list