Writing and reading integers from a file

f=open('myfile.txt','w')
for count in  range(5):
      f.write(str(count))
f.close()
f=open('myfile.txt','r')
t=f.read()
print t

No comments: