output = open ('out.txt', 'w')
output.write ('A \\ n')
output.write ('B \\ n')
output.write ('C \\ n ')
output.write (' D \\ n ')
output.write (' E \\ n ')
output.write (' F \\ n ')
output.close ()
input = open (' out. txt ',' r ') s =
input.readline ()
while s! ='': print s
input.readline s = ()
input.close ()
open: open a file , 'r' in reading, 'W' for writing
input.readline () : reads a line from the stream associated with the variable input
input.close () : Closes stream associated with the variable input
0 comments:
Post a Comment