Skip to content

Instantly share code, notes, and snippets.

@Drunkar
Last active August 4, 2016 10:09
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 Drunkar/6750485 to your computer and use it in GitHub Desktop.
Save Drunkar/6750485 to your computer and use it in GitHub Desktop.
import sys
import codecs
sys.stdin = codecs.getreader("utf-8")(sys.stdin)
sys.stdout = codecs.getwriter("utf-8")(sys.stdout)
lines = sys.stdin.read().splitlines()
table = []
for line in lines:
table.append(line.split("\t"))
table = map(list, zip(*table))
for row in table:
print "\t".join(row)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment