Cody Bable

Generation

generate functionFri, 21 Apr 2023

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

def read_and_write(in_filename, out_filename): with open(in_filename, 'r') as fin: with open(out_filename, 'w') as fout: for line in fin: fout.write(line)

Questions about programming?Chat with your personal AI assistant