I know that you can have PHP -code inside HTML -file. I would like to know how you can do the same with Python.
How can you run Python inside a HTML document?
Look at django templating engine for example. django
Cheetah is a Python-powered template engine and code generator. It may be used as a standalone utility or combined with other tools. Cheetah has many potential uses, but web developers looking for a viable alternative to ASP, JSP, PHP and PSP are expected to be its principle user group.
You will need something like mod_python for apache, or play with cgi.
It really depends on your web server