which is well documented :
x or y if x is false, then y, else x
x and y if x is false, then x, else y
both short circuits (for example, orwill not evaluate yif xtrue).
the documentation also states that is false ( False, 0, None, empty sequences / matching ...) - everything else is considered to be true.
a few examples:
7 and 'a'
[] or None
{'a': 1} or 'abc'[5]
False and 'abc'[5]
, : ( IndexError) .
, . python booleans ( 2 : True False, int). python , . bool function .
, , python. , , . english.stackexchange.com, wikipedia.