Created
July 11, 2011 13:31
-
-
Save fnielsen/1075844 to your computer and use it in GitHub Desktop.
pløf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
texts = [ open(filename).read().split() for filename in sys.argv[1:]] | |
maxlength = [ max(map(len, t)) for t in texts ] | |
for line in zip(*texts): | |
print("".join([ line[n] + " " * (maxlength[n] - len(line[n]) + 1) for n in range(len(line)) ])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment