title: What is the perfect counterpart in Python for "while not EOF"
body: <p>To read some text file, in C or Pascal, I always use the following snippets to read the data until EOF:</p>
  
  <pre><code>while not eof do begin
    readline(a);
    do_something;
  end;
  </code></pre>
  
  <p>Thus, I wonder how can I do this simple and fast in Python? </p>