thomasvang...@gmail.com wrote:
Thanks,
This works great!
I did not know that it is possible to iterate through the file lines
with a while function that's conditional on additional lines being
present or not.

It relies on file.readline() returning an empty string when it's at the
end of the file (and that's the only time it does) and empty strings
being treated as False by 'while' (and non-empty strings being treated
as True). It's all in the docs! :-)
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to