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 fileCopy(source, target): sourceFile = open(source, 'r') targetFile = open(target, 'w') for line in sourceFile: targetFile.write(line) targetFile.close() sourceFile.close()

Questions about programming?Chat with your personal AI assistant