jackfrued/Python-Core-50-Courses

第10课:字符串的使用 is判断在python3.10.11中为True

sniperwang00 opened this issue · 3 comments

s1 = 'hello world'
s2 = 'hello world'
s3 = s2

print(s1 == s2, s2 == s3) # True True
print(s1 is s2, s2 is s3) # False True

实际执行结果为:
True True
True True

应该是加入了字符串缓冲池导致的?

b11152 commented