page = 100 # page += 1 相当于 page = page + 1 page += 1 print(page) page -= 3 print(page) num1 = 3 # 相当于num1 = num1 * 2 num1 *= 2 print(num1) # 相当于 num1 = num1 / 3 num1 /= 3 print(num1) a = 9 a //= 4 # 相当于 a = a // 4 print(a) b = 10 b %= 3 # b = b % 3 print(b) c = 3 c **= 4 # c = c ** 4 print(c)
复合赋值运算符
最新推荐文章于 2024-08-24 11:00:49 发布