Python教程 not运算符

2024-10-13 05:36:44

1、新建一个not运算符.py 文件,如图所示:

Python教程 not运算符

3、not运算符的作用:对x进行布尔取反操作,语法如图所示:

Python教程 not运算符

5、使用 type() 函数获取此时变量 x 的类型,如图所示:

Python教程 not运算符
猜你喜欢