Is there a way in Python to exit the program if the line is blank?
<p>My file is a .txt file and all comments have no spaces before them.</p>

<p>I have a file with 10,000 lines that looks like this and I am reading every line of the file.</p>

<pre><code>## something
## something
## something
12312312
123123
12312312
123123
123123
</code></pre>

<p>However, my code will fail if there is not a value in every line.</p>

<p>Is there a way in Python to exit the program if the line is blank?</p>

<p>I just need a simple If statement to fix my program.</p>

<p>Something like </p>

<pre><code>if line == blank:
    quit
</code></pre>