I want to do an inline check to see if an object exists or is None
.
Coming from LUA I'm used to writing print user and 'logged in' or 'not logged in'
.
However when searching the web, I can't find this method anywhere. Instead people advice you to use print 'logged in' if user else 'not logged in'
.
Both methods work though, is there a reason why I shouldn't use print var and 'yes' or 'no'
?