title: f.readlines() Won't Return Any Values?
body: <p>So I was reading over the Python Documentation/Tutorial, specifically I was looking at the Input/Output with files. This is what the tutorial says will return whatevers in the file:</p>
  
  <pre><code>&gt;&gt;&gt; f.readline()
  'This is the first line of the file.\n'
  &gt;&gt;&gt; f.readline()
  'Second line of the file\n'
  &gt;&gt;&gt; f.readline()
  ''
  </code></pre>
  
  <p>I put the same thing in my .py and it didn't return any exceptions or issues, but it didn't return any values, either. This is my code:</p>
  
  <pre><code>f = open('test.txt')
  
  f.readlines()
  </code></pre>
  
  <p>Unless I use the variables and a <code>print</code>, the program will not return anything thats in the file. Heres my files contents:</p>
  
  <pre><code>Hello This Is Test
  For Loops In Files
  Flying Away
  A Bird also Flies
  Wow
  </code></pre>
  
  <p>Any ideas as to why this isn't working? I think its my interpreter, as I am using SublimeREPL, but it hasn't been doing anything weird before then so I am not too sure. Also, when I try running it in my Python console, it gives me an error, then just closes the console so I can't even see the error. Pretty counter-productive.</p>
  
  <p>EDIT: Just to clarify, my issue is not the <code>for</code> loop, the <code>for</code> loop already worked fine from before. The issue is that <code>f.readlines()</code> does not return any lines, even though the documentation says it should return the next line. I will take the <code>for</code> loop out of my code to clarify. Also, sorry if I am mixing up <code>f.readline()</code> and <code>f.readlines()</code>, but they both don't work, anyway. Thanks,</p>
  
  <ul>
  <li>Sa'id</li>
  </ul>
  
  <p>ANSWER: For anyone who ever encounters this issue, or is just curious, the issue was that when scripting I had to use <code>print</code>, but in a command prompt, I can just use <code>f.readlines()</code> and it will read the lines. Thanks to @wwii.</p>