What is the most pythonic way to build up large strings?

cstrutton11 at gmail.com cstrutton11 at gmail.com
Sat Feb 8 04:56:46 EST 2014


On Saturday, February 8, 2014 3:13:54 AM UTC-5, Asaf Las wrote:
 
> 
> note, due to strings are immutable - for every line in sum operation 
> 
> above you produce new object and throw out older one. you can write 
> 
> one string spanned at multiple lines in very clear form. 
> 

I get what your saying here about immutable strings.  Is there anyway efficiently build large strings with lots of conditional inclusions, repetative sections built dynamically by looping (see the field section above)etc.  Is there a mutable string class?



More information about the Python-list mailing list