Thomas Liesner wrote: > ... i want to print always three of them in a single line and > after that a linebreak.
How about: def emit(aFile): for line in aFile: for word in line.split(): yield word f = open('xyplan.nobreaks', 'r') gen = iter(emit(f)).next try: while True: for i in range(2): print gen(), print gen() except StopIteration: pass f.close() print --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list