Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

python not operator

 Python not operator:

  • python not operator is the complement of the given value i.e; if the value is true then it returns false and if the value is false then it returns true.
  • When we  apply the not operator we get result  in  boolean type .
  • example:
                 x=10 
                 not x, then the result is false because x=10 is true so not x is false.
  • syntax:(not x).

 # write a python program using not operator.

  1. x="python"
  2. y="java''
  3. print(not x==y)
output: true

 



This post first appeared on Java Tutorial - InstanceOfJava, please read the originial post: here

Share the post

python not operator

×

Subscribe to Java Tutorial - Instanceofjava

Get updates delivered right to your inbox!

Thank you for your subscription

×