3.3 逻辑非运算

逻辑或运算

使用not运算符对一个条件表达式进行逻辑取非操作。

语法

not x     # x 代表表达式

示例

>>> not True
False
>>> not False
True
视频讲解