most idiomatic looping over a file?

Mark Harrison mh at pixar.com
Wed May 28 21:09:49 EDT 2003


What's the most idiomatic way to loop over input
one line at at time, like the C code

	while ((s = fgets(...)) != NULL) { ... }

Many TIA,
Mark

-- 
Mark Harrison
Pixar Animation Studios




More information about the Python-list mailing list