def concat_iter(file1, file2, output):
    with open(output, 'w', 1024) as fo:
        with open(file1, 'r') as f1:
            with open(file2, 'r') as f2:
                pass
Fastest way to concatenate multiple files column wise - Python