Skip to content

Instantly share code, notes, and snippets.

@K-atc
Created July 4, 2015 21:18
Show Gist options
  • Select an option

  • Save K-atc/4ef035b7c1f51f9d342d to your computer and use it in GitHub Desktop.

Select an option

Save K-atc/4ef035b7c1f51f9d342d to your computer and use it in GitHub Desktop.
縦読み
# coding: UTF-8
import sys
if not(len(sys.argv) >= 2):
print "tateyomi: 縦読みしてくれるプログラム"
print "usage: python tateyomi.py <file> [<offset>]"
exit()
offset = 0
if len(sys.argv) > 2:
offset = int(sys.argv[2])
f = open(sys.argv[1], 'r')
output = ''
for line in f.readlines():
output += line[offset:offset+1]
print output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment