I tried running this piece of code:
path = '/bla/bla/bla'
if path is True:
print "True"
else:
print "False"
And it prints False. I thought Python treats anything with value as True. Why is this happening?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…