annotate toolfactory/test-data/pyrevpos.python @ 79:2d0272e730d1 draft

Uploaded
author fubar
date Tue, 17 Nov 2020 06:21:07 +0000
parents 4d578c8c1613
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
32
4d578c8c1613 passes planemo test
fubar
parents:
diff changeset
1 # reverse order of text by row
4d578c8c1613 passes planemo test
fubar
parents:
diff changeset
2 import sys
4d578c8c1613 passes planemo test
fubar
parents:
diff changeset
3 inp = sys.argv[1]
4d578c8c1613 passes planemo test
fubar
parents:
diff changeset
4 outp = sys.argv[2]
4d578c8c1613 passes planemo test
fubar
parents:
diff changeset
5 i = open(inp,'r').readlines()
4d578c8c1613 passes planemo test
fubar
parents:
diff changeset
6 o = open(outp,'w')
4d578c8c1613 passes planemo test
fubar
parents:
diff changeset
7 for row in i:
4d578c8c1613 passes planemo test
fubar
parents:
diff changeset
8 rs = row.rstrip()
4d578c8c1613 passes planemo test
fubar
parents:
diff changeset
9 rs = list(rs)
4d578c8c1613 passes planemo test
fubar
parents:
diff changeset
10 rs.reverse()
4d578c8c1613 passes planemo test
fubar
parents:
diff changeset
11 o.write(''.join(rs))
4d578c8c1613 passes planemo test
fubar
parents:
diff changeset
12 o.close()
4d578c8c1613 passes planemo test
fubar
parents:
diff changeset
13