赋值运算符

'''
赋值运算符
=
+=
-=
*=
/=
//=**=
'''

a = 8
c = a + 1
print(a, c)
a += 1  # a = a+1
c = a + 1
print(a, c)
'''
说明一下,上面先是给a赋值为8,c赋值为a+1,输出a,c,得到得结果为8,9
接下来用 a+=1,意思就是a = a+1,那么此时a=9,再把a+1赋值给c,此时c得到得值就会是10
'''
a += c  # 意思是a = a + c
print(a)  # 输出a = 19

# 同理,a -= c 意思是,a = a-c
# a /= c 意思是,a = a/c