0
Files
Hey so I cant wrap my head around how to start a file, type it, and then read it. I've been using the python shell (3.6) to try this. Is this wrong to do?
3 Answers
+ 12
file=open("thing.txt", 'w')
file.write("whatever you want")
file.close()
file=open("thing.txt", 'r')
stuff=file.read()
file.close()
print(stuff)
#this should work in idle
+ 8
Is it possible to get a code snippet of what you have written so we can inspect where you are stuck?
0
It's the Idle form of the program I'm using.