Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

the operands of the logical operators should be boolean expressions, but python is not very strict. any nonzero number is interpreted as true.

      x != y               # x is not equal to y
      x > y                # x is greater than y
      x < y                # x is less than y
      x >= y               # x is greater than or equal to y
      x <= y               # x is less than or equal to y
      x is y               # x is the same as y
      x is not y           # x is not the same as y
 
PREVIOUS NEXT
Tagged: #operands #logical #operators #boolean #python #nonzero #number #interpreted
ADD COMMENT
Topic
Name
3+4 =