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:
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.
- x="python"
- y="java''
- print(not x==y)
output: true
No comments