1、运算符

  +  -  *  /  **  %  //

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

  判断某个东西是否在某个东西里面包含

      in                not  in

     结果就是布尔值。

  如:

  name="杨超越"

  if  "杨" in name:

    print('ok')

  else:

    print('error')

 

not  in 相反

  布尔值:True  真     False  假

如:

n=9==2
print(n)

输出:False
9==2就是一个布尔值,不成立就是False

与或非:and or not
1==1 and 2==2 为真Ture
1==1  and  2==3  or 3==3 and 4==5  从左到右  结果为False 

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄