Python not Keyword

❮ Python Keywords


Example

Return True if the statement is not True:

x = False

print(not x)
Try it Yourself »

Definition and Usage

The not keyword is a logical operator.

The return value will be True if the statement(s) are not True, otherwise it will return False.


Related Pages

The keywords or, and and are also logical operators.

Read more about operators in our Python Operators Tutorial.


❮ Python Keywords

Copyright 1999-2023 by Refsnes Data. All Rights Reserved.