Silly question re: 'for i in sys.stdin'?

Tom Eastman tom at cs.otago.ac.nz
Mon Apr 4 21:59:24 EDT 2005


Jeff Epler wrote:
> The iterator for files is a little bit like this generator function:
> <SNIP>

Cool thanks for that, it looks like iter(f.readline, '') is the best
solution for the job.

        Tom





More information about the Python-list mailing list