SyntaxFix
Write A Post
Hire A Developer
Questions
is compares identity. A string will never be identical to a not-string.
is
== is equality. But a string will never be equal to either True or False.
==
True
False
You want neither.
path = '/bla/bla/bla' if path: print "True" else: print "False"