python: how to check if a line is an empty line
<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 ""; 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>

<p>Thanks!</p>
