标签:周杰伦 布尔值 pass class code int print name false
算术运算符:+、-、*、**、/、//、%
a+=b
a=a+b
in 和 not in:判断是否包含在某个东西里面
name = "周杰伦" if "周" in name: print("True") else: print("False") if "杰伦" in name: print("True") else: print("False") if "周杰" in name: print("True") else: print("False") #True #next one is false if "周伦" in name: print("True") else: print("False")
name = "周杰伦" if "周" not in name: print("false") else: print("true")
布尔值: 真True、假False
if True: pass
v = 3 > 1
print(v)
==、>、<、>=、<=、!=、<>(也是不等于)、not、and、or
标签:周杰伦 布尔值 pass class code int print name false
原文地址:https://www.cnblogs.com/SlowIsFast/p/12913813.html