title: Python open file statement is reading line from empty file
body: <p>I am trying to read a file using the following statement:</p>
  
  <pre><code>input = open("input.txt").read().split('\n')
  </code></pre>
  
  <p>So basically my objective is to read the file line by line and store results in an array. It works perfect when the file is not empty. When input file has only one line <code>len(input)</code> is 1, which is as expected. </p>
  
  <p>But when the file is empty, <code>len(input)</code> still gives 1. What am I doing wrong? </p>