title: Python if a var doesn't exist then
body: <p>I'm developing some IMAP checker. Now the inbox count is prints a message in the following layout: ['<em>number</em>'].</p>
  
  <p>Now that that number is split to the <em>number</em> in var num. See the following code:</p>
  
  <pre><code>for num in data[0].split():
      print num
  </code></pre>
  
  <p>Now the thing is, if there ain't any new emails num doesn't exist so I want an if statement like this:</p>
  
  <pre><code>if &lt;num doesn't exist&gt;: print "No new emails found."
  </code></pre>
  
  <p>But what should that if statement look like?</p>