<class '_io.TextIOWrapper'>
This is line 1.
Second line.
Last line.
See, one more.
In [7]:
f=open('outdata.txt','w')foriinrange(10):f.write('This is the line {}\n'.format(i))f.close()
In [9]:
forsinopen('outdata.txt'):print(s)
This is the line 0
This is the line 1
This is the line 2
This is the line 3
This is the line 4
This is the line 5
This is the line 6
This is the line 7
This is the line 8
This is the line 9