Look at
It will evaluate True value of each expr from left to right. These are non-empty tuples, so they both are considered to be True. It's a
(True, 2) and (False, False)
. Here you have exprA and exprB
, where exprA=(True, 2) and exprB=(False, False).It will evaluate True value of each expr from left to right. These are non-empty tuples, so they both are considered to be True. It's a
and
operator and in the link I shared is explained how it works.Quote:x and y ==> if x is false, then x, else y
>>> bool((True, 2)) True >>> bool((False, False)) True >>> (True, 2) and (False, False) (False, False) >>> (False, False) and (True, 2) (True, 2)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs