Cody Bable

Generation

generate functionFri, 21 Apr 2023

read from one file and write to another file line by line until end of file

f= open('path/to/file1','r') f2 = open(path/to/file2,'w') for line in f: f2.write(line) f.close() f2.close()

Questions about programming?Chat with your personal AI assistant