# is 比较的是内存地址 == 比较内容和数据类型
a = [1,2,3]
b = a
print(a is b)
print(a == b)
c = copy.deepcopy(a)
print(a is c)
print(a == c)
-------------
True
True
False
True
原文链接:https://www.f2er.com/pythoninterview/997922.html# is 比较的是内存地址 == 比较内容和数据类型
a = [1,2,3]
b = a
print(a is b)
print(a == b)
c = copy.deepcopy(a)
print(a is c)
print(a == c)
-------------
True
True
False
True
原文链接:https://www.f2er.com/pythoninterview/997922.html