What are the logical operators?

  • and
  • or
  • not
#examples
>>> a=99
>>> b=1
>>> c=1

>>> (a!=b) and (c==b)
True

>>> (a<b) or (a>c)
True

>>> not(b==c)
False
Advertisements