title: In Python, what is the difference between f.readlines() and list(f)
body: <p>From both <a href="https://docs.python.org/2/tutorial/inputoutput.html#methods-of-file-objects" rel="nofollow">Python2 Tutorial</a> and <a href="https://docs.python.org/3.4/tutorial/inputoutput.html#methods-of-file-objects" rel="nofollow">Python3 Tutorial</a>, there is a line in the midpoint of <em>section 7.2.1</em> saying:</p>
  
  <blockquote>
    <p>If you want to read all the lines of a file <strong>in a list</strong> you can also use <code>list(f)</code> or <code>f.readlines().</code></p>
  </blockquote>
  
  <p>So my question is: What is the difference between these two ways to turn a file object to a list? I am curious both in performance aspect and in underneath Python object implementation (and maybe the difference between the Python2 and Python3).</p>