Skip to content

Instantly share code, notes, and snippets.

@studiawan
Created October 3, 2013 23:49
Show Gist options
  • Save studiawan/6818891 to your computer and use it in GitHub Desktop.
Save studiawan/6818891 to your computer and use it in GitHub Desktop.
Write to text file using Python
data = 'Beautiful Python'
f = open('file.txt', 'w')
f.write(data)
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment