Python语言基础50课
Geek Repo:Geek Repo
Github PK Tool:Github PK Tool
Suny-02 opened this issue 7 months ago · comments
第11课 s1 = 'hello world' s2 = 'hello world' s3 = s2
print(s1 == s2, s2 == s3) # True True
print(s1 is s2, s2 is s3) # False True
s1 is s2 会返回true s1 s2 s3三个对象引用同一个字符串池