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