diff options
| author | Patrick Simianer <patrick@lilt.com> | 2026-02-26 10:05:59 +0000 |
|---|---|---|
| committer | Patrick Simianer <patrick@lilt.com> | 2026-02-26 10:05:59 +0000 |
| commit | b31ace79ea5f6b3f279c544cd3a443d6fbf2a24d (patch) | |
| tree | 31f2b599fa5f6996aeb134390d58deb63eefe04a /paste-pairs | |
| parent | 8805e95ae94d798c6441f7e1b72c90e049563f17 (diff) | |
Diffstat (limited to 'paste-pairs')
| -rwxr-xr-x | paste-pairs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/paste-pairs b/paste-pairs index f6b8b31..7e08329 100755 --- a/paste-pairs +++ b/paste-pairs @@ -1,10 +1,8 @@ -#!/usr/bin/python +#!/usr/bin/env python3 import sys -from itertools import izip - -for linenr, (src_line, tgt_line) in enumerate(izip(open(sys.argv[1]), open(sys.argv[2]))): - print linenr, (src_line.strip()) - print linenr, (tgt_line.strip()) - print +for linenr, (src_line, tgt_line) in enumerate(zip(open(sys.argv[1]), open(sys.argv[2]))): + print(linenr, src_line.strip()) + print(linenr, tgt_line.strip()) + print() |
