动态类型
a = 2
b = a
a = 'spam'
print(a) # spam
print(b) # 2
a = 3
b = a
a += 2
print(a) # 5
print(b) # 3
a = [1,2,3]
b = a
a = 24
print(a) # 24
print(b) # [1, 2, 3]
a = [1,2,3]
b = a
a[0] = 24
print(a) # [24, 2, 3]
print(b) # [24, 2, 3]
a = [1,2,3]
b = a[:]
a[0] = 24
print(a) # [24, 2, 3]
print(b) # [1, 2, 3]
aa = [1,2,3]
bb = [1,2,3]
print(a == b) # True
print(a is b) # False
a = 1
b = 1
print(a == b) # True
print(a is b) # True
import sys
print(sys.getrefcount(1)) # 929
print(sys.getrefcount(['rdg','ehfg'])) # 1
a = 11111111111111116235443764
b = 11111111111111116235443764
print(a is b) # True
print(sys.getrefcount(a)) # 4