Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python boolean operators

>>> # The not operator is the opposite of it
>>> not True
False
>>> not False
True
>>> # The and operator is True only if both are are true
>>> True and True
True
>>> False and True
False
>>> False and False
False
>>> # The or operator is True if either of them are true
>>> True or True
True
>>> False or True
True
>>> False or False
False
 
PREVIOUS NEXT
Tagged: #python #boolean #operators
ADD COMMENT
Topic
Name
7+2 =