I am Python newbie, so maybe don't knew if this is obvious or not.
In Javascript a||b returns a if a is evaluated to true, else returns b.
Is that possible in Python other than lengthy if else statement.
In python you can use something like this
result = a or b
which may give you result=a if a is not False (ie not None, not empty, not 0 length), else you will get result=b
result = a or b, result = a if a else b (or longer: if a: result = a [line break] else: result = b). Upvoting anyway (for being correct).