I though I understood Python the "and" operator. But after seeing
assert (None and None) is None
it was apparently that my understanding was not precise. Which was that None and None
would be the same as bool(None) and bool(None)
.
Does anybody have definition of the "and" operator and can explain the logic.