On Saturday, February 8, 2014 11:56:46 AM UTC+2, cstru...@gmail.com wrote: > 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, repetitive sections > built dynamically by looping (see the field section above)etc. > Is there a mutable string class?
Check this approach if it suits you: str_t= '<script type="text/javascript' \ '<src="/{0}/jquery/jqueryui.js"></script>' \ '<script type="text/javascript'\ 'src="/{1}/jquery/jquery.js"></script>'.format('bella', 'donna') print(str_t) -- https://mail.python.org/mailman/listinfo/python-list