Cody Bable

Generation

generate functionFri, 21 Apr 2023

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

with open("data/example_file.txt", "r") as input_file, open("data/example_file_out.txt", "w") as output_file: for line in input_file: output_file.write(line)

Questions about programming?Chat with your personal AI assistant