I'm not a novice programmer and I know what booleans are and how to use them. Trouble is, I can't quite understand what is implied in Python's documentation regarding boolean operations:
or_test ::= and_test | or_test "or" and_test
and_test ::= not_test | and_test "and" not_test
not_test ::= comparison | "not" not_test
It means that
and binds tighter than
or does. Note that
or_test does not have to contain
and, it contains the
and_test rule, which is constructed from either an
not_test rule or
and_test "and" not_test.
not_test itself constructed in a similar manner, etc.
Also see the Notation section of the reference documentation.