SyntaxFix
Write A Post
Hire A Developer
Questions
In python, bool(sequence) is False if the sequence is empty. Since strings are sequences, this will work:
bool(sequence)
False
cookie = '' if cookie: print "Don't see this" else: print "You'll see this"