title: Python for line in file?
body: <p>Is there a way to create a loop in Python that reads a file, line by line, and does an action using the line? For example:</p>
  
  <pre><code>for eachLine in '~/file':
      print eachLine
  </code></pre>
  
  <p>which would print <code>~/file</code> to the terminal</p>