2 Answers
+ 2
in html not too much but you can build webapps with python and django. it can be used to output certain things in html
+ 2
Currently you can do something similary to what you say with a template engine. I do not usually use Python, but I've seen that Jinja2 is often very popular:
http://jinja.pocoo.org/docs/2.10/