annotate toolfactory/test-data/pyrevpos.python @ 32:4d578c8c1613 draft

passes planemo test
author fubar
date Fri, 07 Aug 2020 23:14:54 -0400
parents
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