What is the most pythonic way to build up large strings?
Rustom Mody
rustompmody at gmail.com
Sat Feb 8 03:35:34 EST 2014
On Saturday, February 8, 2014 1:11:53 PM UTC+5:30, cstru... at gmail.com wrote:
> I am writing a couple of class methods to build up several lines of html. Some of the lines are conditional and most need variables inserted in them. Searching the web has given me a few ideas. Each has its pro's and cons.
For creating html the method of choice is a template engine -- cheetah, mako
and a dozen others
You can of course roll your own (poor mans version) template engine
For that look up
1. triple quoted strings
2. format operator
More information about the Python-list
mailing list