On 2014-10-13 14:45, Joel Goldstick wrote: > Not apropos to the OP, but what came up in my mind was to write a > generator function that returns every other line. This would > separate the reading from the writing code.
You mean like
offset = 0 # or 1 if you prefer
for line in itertools.islice(source_iter, offset, None, 2):
do_something(line)
?
-tkc
--
https://mail.python.org/mailman/listinfo/python-list
