I have a problem with iterating on a file. Here\'s what I type on the interpreter and the result:
>>> f = open(\'baby1990.html\', \'rU\')
>>&g
The file object is a buffer. When you read from the buffer, that portion that you read is consumed (the read position is shifted forward). When you read through the entire file, the read position is at the end of the file (EOF), so it returns nothing because there is nothing left to read.
If you have to reset the read position on a file object for some reason, you can do:
f.seek(0)