On 19/07/12 07:00, Steven D'Aprano wrote:
def four_lines(file_object):
<snipping>....
line1 = next(file_object).strip() # Get the next three lines, padding if needed. line2 = next(file_object, '').strip() line3 = next(file_object, '').strip() line4 = next(file_object, '').strip() yield (line1, line2, line3, line4)
<snipping>...
for reads, lines in four_lines( INFILE ): ID_Line_1, Seq_Line, ID_Line_2, Quality_Line = lines
Shouldn't that be for reads, lines in enumerate( four_lines(INFILE) ): ID_Line_1, Seq_Line, ID_Line_2, Quality_Line = lines ? -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor