0
Why is print (false or true) always true?
When I use integer values instead of boolean e.g. Print (4 or 5) it prints the first value. But the print (false or true) always prints the word true. Why?
2 Réponses
+ 7
because in Boolean algebra “or“ is true if at least one part is true.
+ 2
Boolean AND and or
>>> print (False and True)
False
>>> print (False or True)
True