Skip to content

Instantly share code, notes, and snippets.

@acrymble
Created July 5, 2011 19:42
Show Gist options
  • Select an option

  • Save acrymble/1065702 to your computer and use it in GitHub Desktop.

Select an option

Save acrymble/1065702 to your computer and use it in GitHub Desktop.
Python write HTML
# write-html.py
f = open('helloworld.html','w')
message = """<html>
<head></head>
<body><p>Hello World!</p></body>
</html>"""
f.write(message)
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment