Skip to content

Instantly share code, notes, and snippets.

@accessnash
Created October 19, 2015 07:26
Show Gist options
  • Save accessnash/e0176dfa0d1fe2f19196 to your computer and use it in GitHub Desktop.
Save accessnash/e0176dfa0d1fe2f19196 to your computer and use it in GitHub Desktop.
"""Create a file to display content"""
f = open('output_file.txt', 'r')
print(f.read())
while True:
text = input("Enter text: ")
if not text:
print("Finished")
break
out_file = open('output_file.txt', 'a')
out_file.write(text)
out_file.close()
otpt = open('output_file.txt', 'r').read()
print (otpt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment