I was watching a 2007 video on Advanced Python or Understanding Python, and at 18’27” the speaker claims “As some may know in Python and and or return one of the two values, whereas not returns always a boolean.” When has this been the case?
As far as I can tell, and and or return booleans, too.
The
andandoroperators do return one of their operands, not a pure boolean value likeTrueorFalse:Whereas
notalways returns a pure boolean value: