# 赋值运算符
a = 1
b = 2
c = 3
d = 4
e = 23
f = 32
g = 99
# 加法运算符
# a = a + 1
a+=1
print(a)
str="abc"
str+="bcd"
print(str) #拼接
b-=3 # b=b-3
print(b)
c*=3
print(c)
d/=10
print(d)
# 取模,幂运算,取整数
e %=4 # 取模
print(e)
f**=2 # 幂运算
print(f)
g//=2 # 取整数
print(g)
# 成员运算符号 in / not in 在指定序列中找到值
sheet=["张三","李四","王五"]
if("张三" in sheet):
print("张三在队列中")
else:
print("张三没有在队列中")
if("林六" not in sheet):
print("林六未在队列中")
else:
print("林六在队列中")
# 身份运算符 is / is not 判断两个变量是否用同一个对象(同一内存地址)类似java中的isequal和==
h = 43
i = h
j = 43.0
print(h is i) # 对象(地址)等
print(h == j) # 数值等
print(h is j)
# 二进制位运算符
"""
& 按位与
| 按位或
^ 按位异或
~ 按位取反
<< 左移动运算符
>> 右移动运算