Python——逻辑运算符
众所周知,每一门语言都有一些条件判断的语句
Python也不例外
三大运算符:
and(与)
or (或)
not (非)
通过其中的含义和配合中文意思就能明白其中的作用
and:
作用:判断and左右两边的值或者表达式是否为***True***
返回值:如果左右两边为True,那么and也会返回True,不符合则返回False
代码演示:
a = 5
if a == 10 - a an...
原创
2020-02-28 18:37:56 ·
235 阅读 ·
0 评论