2019-02-23
阅读量:
668
python中的逻辑运算
逻辑运算符:逻辑运算符执行逻辑AND,逻辑OR和逻辑NOT运算。
# Examples of Logical Operator
a = True
b = False
# Print a and b is False
print(a and b)
# Print a or b is True
print(a or b)
# Print not a is False
print(not a)
输出:
False
True
False
True
False
True






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
0条评论