Modify one character in a string

mp mailpitches at email.com
Thu May 25 01:17:19 EDT 2006


X-No-Archive
How do I go about modifying one character in a string elegantly?
In other words, I want a function that will change 'aaaa' to 'aaza',
given the index 2 of the character in the string.

Also, how do I do this when dealing with a file ; which file mode
should I use and what function should I use to modify a single
character once in that file mode?

Thanks
MP




More information about the Python-list mailing list