In reading a file you often want to read through the entire thing, but to do so you need to know when you have reached the end.
So you test for the end of the file (eof). The file object has the eof method that returns a true after the first read operation that attempts to read past the end of the file.
Leave a Reply
You must be logged in to post a comment.