Cody Bable

Generation

generate functionMon, 24 Apr 2023

read from source file one line at a time and write to target file one line at time.

def copy_file(source, target): source_file = open(source) target_file = open(target, "w") for line in source_file: target_file.write(line) source_file.close() target_file.close()

Questions about programming?Chat with your personal AI assistant