Here is the code I wrote
I tried running this in a python shell and it worked fine. When I try to run this in terminal, it doesn't work. I have tried using python and python3.
Code: Select all
# Grabs a line from user input and saves it to a file import sys for line in sys.stdin: file = open('notes.txt', 'a') file.write(line) file.close()
Maybe it is something in my code? I haven't used python before, though I have coded for a while using Java/C++