Paste-python

From CleanPosts

Jump to: navigation, search

Paste two files together in columns

#!/usr/bin/python3

import sys
with open ("col1.txt","r") as test1:
    lines1 = test1.readlines()
with open ("col2.txt","r") as test2:
    lines2 = test2.readlines()

for i in range (0,46,1):
    sys.stdout.write(lines1[i].rstrip())
    sys.stdout.write("  ")
    sys.stdout.write(lines2[i])
Personal tools
Strangers In Paradise