# # 算数运算符
#
# # + 求和
# a = 2
# d = 3
# c = a + d
# print(c)
# # -
# print(d - a)
#
# # * 乘法
# print(a*d)
#
# # / 除法
# print(d/a)
#
# # % 取余
# print(d % a)
#
# # ** 幂数 次方
# print(a**d)
#
# # // 取整
# print(30//4)
# 比较运算符
# # == 判断对象是否相等
# print(1+1 == 2) # 输出一个布尔型 bool
#
# # != 判断两边是否不等于
# print(1+1 != 3)
#
# # > 大于
# print(2 > 3)
# # < 小于
# print(3 < 2)
# # >= 大于或等于
# print(3 >= 2)
#
# # <= 小于或等于
# print(2 <= 3)
# 赋值运算符
# += -= /= *=
# a = 10
# b = 30
# c = a+b
# a = 10
# a += 30
# print(a)
#
# # 位运算符
# # & 按位与运算符
# a = 60
# # 查看二进制 bin()
# print(bin(a)) # 0b可以在前面补0的
# # 二进制转几进制
# b = '00001001'
# print(int(b, 16))
#
# # 逻辑运输符
# # and 同时满足两边的条件结果为:Ture 否则就为:False
# print(1+1 == 2 and 2+2 == 4) # Ture
#
# # or 只要有一边满足,则结果为Ture ,满足一方即可。
# print(2+2 == 4 or 3+4 == 5)
#
# # not 真假倒置
# print(not 2+3 == 4)
# 成员运算符
# in 判断是否在里面
# a = "a"
# b = "abc"
# print(a in b)
# # not in 倒置
# a = "a"
# b = "abc"
# print(a not in b)
# 身份运算符
# is 判断两个对像是否相同
# a = 1
# b = 1
# print(a is b) # print(a == b)
# # not is 判断两个对像是否不同
# a = 1
# b = 1
# print(a is not b) # print(a == b)
标签:判断,运算,##,30,运算符,print,字符串,Ture From: https://www.cnblogs.com/luyi666/p/16848944.html