comparison toolfactory/test-data/pyrevpos.python @ 62:881bd8c81ac9 draft

Uploaded
author fubar
date Mon, 26 Oct 2020 02:51:54 +0000
parents 4d578c8c1613
children
comparison
equal deleted inserted replaced
61:dc923f16e6ff 62:881bd8c81ac9
1 # reverse order of text by row
2 import sys
3 inp = sys.argv[1]
4 outp = sys.argv[2]
5 i = open(inp,'r').readlines()
6 o = open(outp,'w')
7 for row in i:
8 rs = row.rstrip()
9 rs = list(rs)
10 rs.reverse()
11 o.write(''.join(rs))
12 o.close()
13