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