Python not Keyword

Example

If the statement is not True, the return value is True:

x = False
print(not x)

Run Instance

Definition and Usage

The not keyword is a logical operator.

If the statement is not True, the return value is True, otherwise False.

Related Pages

Keywords or and and It is also a logical operator.

Please visit our Python Operator Tutorial Learn more about operators in Chinese.