Organize large DNA txt files
google at mrabarnett.plus.com
Fri Mar 20 17:38:34 CET 2009
thomasvangurp at gmail.com wrote:
> 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! :-)
More information about the Python-list