Efficient way to read data in python
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/519633/lazy-method-for-reading-big-file-in-python">Lazy Method for Reading Big File in Python?</a>  </p>
</blockquote>



<p>I need to read 100 GB (400 million lines) of data from a file line by line. This is my current code, but is there any efficient method to do this. 
I mean in terms of execution speed.</p>

<pre><code>f = open(path, 'r')

for line in f: 
    ...

f.close()
</code></pre>
