You might not nessecerily be able to code a website with just Python, as HTML is more commonly used, however, you can get python to work along side you HTML code. However, there isn’t just a piece of code you can put in there are several other things as well. The easiest option would be to use a templating engine, as it is hard to manually code the input forit to be included on your web page. I would avoid a templating engine that uses python as its main coding form, as python is sensitive to whitespace, so special syntax hacks would have to be added. A few popular choices would be Mako, Jinja and Geshi or you could use Cheetah.