Python is just too easy

The other day I needed to create an HTML form for an online questionnaire I'm writing for my wife. I thought that I would look for some online Python library for something like this. After a few minutes of searching I didn't find anything that caught my fancy. I thought about it and realized that I don't need anything fancy, I just wanted to be able to make the necessary tags quickly, easily and safely. Writing the code only took a few lines:

The close tag is even easier:

And here's some example code where it was used:

It's nothing fancy, but in my old age I'm starting to appreciate code that is straightforward. The code doesn't indent things nicely, but these days tidy is just a button click away.


Popular posts from this blog

Shortest Sudoku solver in Python

Seven Segment Display in Inkscape

Dot to Png