x = 4
y = 4
aList = [1, 2, 3]
bList = [1, 2, 3]
print(x is y)
print(x == y)
print(aList is bList)
print(aList == bList)
a = 3.2
b = 3.2
print(a is b)
print(a == b)
x = 4
y = 4
print(x is y)
print(x == y)
aList = [1, 2, 3]
bList = [1, 2, 3]
print(aList is bList)
print(aList == bList)
a = 3.2
b = 3.2
print(a is b)
print(a == b)
del a
a
输出结果: True
True
False
True
True
True
Traceback (most recent call last):
File "D:\myWorkSpace\CRUDFile\com\ray\test\CRUDFile.py", line 14, in <module>