Skip to content

Instantly share code, notes, and snippets.

@fnielsen
Created July 13, 2011 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fnielsen/1080175 to your computer and use it in GitHub Desktop.
Save fnielsen/1080175 to your computer and use it in GitHub Desktop.
pløf.python3
import itertools,sys
t=[open(f).read().split()for f in sys.argv[1:]]
m=[max(map(len,u)) for u in t]
print("\n".join(["".join([l[n]+" "*(m[n]-len(l[n])+1)for n in range(len(l))])for l in itertools.zip_longest(*t,fillvalue="")]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment