python中的常见运算符
数学运算:+, -, *, /, **,
# 加法 print(9+3)
# 减法 print(9-3)
# 乘法 print(9*3)
# 除法 print(9/3)
# 求余数 print(103)
# 乘方 print(3**2)
判断:==, !=, >, >=, <, <=, in
# 等于
print(9==3)
# 不等于
print(9!=3)
# 大于,大于等于
print(4>3,4>=3)
# 小于,小于等于
print(3<3,3<=3)
逻辑运算:and, or, not
# “与”运算:一假为假
print(9==3 and 9>3)
# "或"运算:一真为真
print(9==3 or 9>3)
# “非”运算:“非”运算非真即假 print(not 9==3)