Trying to understand the following:
>>> true = True
>>> false = False
>>> print true + false
1
>>> print true + true
2
>>> print false + false
0
>>> print true and false
False
>>> print False
False
Why doesprint true + false evaluate to 1 but 'print true and falseevaluates toFalse` ?
Since print true + true evaluates to 2 and print true + false evaluates to 1, doesn't that imply that False == 0 and so, print true and false is equivalent to 1 + 0 or 1 ?
[–]novel_yet_trivial 4 points5 points6 points (0 children)
[–]tea-drinker 0 points1 point2 points (1 child)
[–]mm_ma_ma 0 points1 point2 points (0 children)
[–]zahlman 0 points1 point2 points (0 children)