RosettaCodeData/Task/Synchronous-concurrency/Python/synchronous-concurrency-2.py
Ingy döt Net 68f8f3e56b all tasks
2013-04-11 01:07:29 -07:00

12 lines
197 B
Python

count = 0
def reader():
for line in open('input.txt'):
yield line.rstrip()
print('Printed %d lines.' % count)
r = reader()
# printer
for line in r:
print(line)
count += 1