from the docs:
also here:
Quote:The expression x and y first evaluates x; if x is false, its value is returned; otherwise, y is evaluated and the resulting value is returned.
also here:
Quote:Boolean Operations — and, or, not
These are the Boolean operations, ordered by ascending priority:
- x or y: if x is false, then y, else x (1)
- x and y: if x is false, then x, else y (2)
- not x: if x is false, then True, else False (3)
Notes:
- This is a short-circuit operator, so it only evaluates the second argument if the first one is false.
- This is a short-circuit operator, so it only evaluates the second argument if the first one is true.
- not has a lower priority than non-Boolean operators, so not a == b is interpreted as not (a == b), and a == not b is a syntax error.
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