Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sniperwang00 opened this issue May 22, 2023 · 3 comments
Open

Comments

@sniperwang00
Copy link

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

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

@hbjcstkl2020
Copy link

hbjcstkl2020 commented May 22, 2023 via email

@b11152
Copy link

b11152 commented May 22, 2023 via email

@CHAMPIOM1
Copy link

CHAMPIOM1 commented May 22, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants