Home >>Python Keywords >Python not Keyword

Python not Keyword

Python not Keyword

Python not keyword is a case-sensitive and logical operator, it is used with a single operand, it returns true if the statement are not true, and returns False if the statement are True.

Here is an example of Python not Keyword:

z = False
print(not z)

Output:
True
Example 2:

x = 15
print(not(x == 15))
print(not(x != 15))
print(not(x > 15))
print(not(x < 15))

Output:
False
True
True
True

No Sidebar ads