How to modify a string in place?

John Powers jpowers at acm.org
Fri May 14 14:48:15 EDT 1999


I tried this variation first, and it sped up my application 39 fold.

Thanks, jpp

Andreas Jung wrote in message <19990514192812.A6239 at sz-sb.de>...
>1) convert the string to a list (lst = list(mystr)). Because lists
>  are mutable you can change the elements of the lists with the
>  known list functions.
>







More information about the Python-list mailing list