# write-html.py f = open('helloworld.html','w') message = """<html> <head></head> <body><p>Hello World!</p></body> </html>""" f.write(message) f.close()