Alan Gauld wrote: > "Robert Hicks" <[EMAIL PROTECTED]> wrote >> This is the loop code: >> >> for line in f2: >> for id in idList: >> if id in line: >> print "%s: %s" % (id, f2.next()) >> found = "%s: %s" % (id, f2.next()) >> f3.write(found) >> > > While I note that you got a solution using regex one general > point worth noting is that you should, in nested loop cases like > this, at least use break in the inner loop. >
Do you mean after the write? That is a good suggestion and thanks for making it Mr. Gauld. Robert _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor