title: python: how to check if a line is an empty line
body: <p>Trying to figure out how to write an if cycle to check if a line is empty.</p>
  
  <p>The file has many strings, and one of these is a blank line to separate from the other statements (not a <code>""</code>; is a carriage return followed by another carriage return I think)</p>
  
  <pre><code>new statement
  asdasdasd
  asdasdasdasd
  
  new statement
  asdasdasdasd
  asdasdasdasd
  </code></pre>
  
  <p>Since I am using the file input module, is there a way to check if a line is empty? </p>
  
  <p>Using this code it seems to work, thanks everyone!</p>
  
  <pre><code>for line in x:
  
      if line == '\n':
          print "found an end of line"
  
  x.close()
  </code></pre>