Creating HTML Files with Python

html_file= open(‘myhtml.html’,‘w’)

message = “””<html>

<head></head>

<body><p>Hello World!</p></body>

</html>”””

html_file.write(message)

html_file.close()

Advertisements