loops, functions, html with python