title: Read Large Text file in Python
body: <p>I want to get each line from a text file in Python ( around 1 billion lines) and from each line I am taking some words and inserting in another file
  I have used </p>
  
  <pre><code>with open('') as f:
     for line in f:
         process_line(line)
  </code></pre>
  
  <p>This process is taking a lot of time, How can I process this to read all the contents in about 2 hours ?</p>