- 小整数缓存池
a = 1
b = 1
print(a is b) # True
- 短字符串
# True
a = "good"
b = "good"
print(a is b)
# False
a = "very good morning"
b = "very good morning"
print(a is b)
# False
a = []
b = []
print(a is b)
本文首发于python黑洞网,博客园同步更新@H_404_56@ 原文链接:https://www.f2er.com/pythoninterview/997924.html