Skip to main content
 首页 » 编程设计

Python 值实际上并不相等

2025年05月04日12pengyingh

<分区>

Possible Duplicate:
Python “is” operator behaves unexpectedly with integers

我正在学习 Python,并且很好奇为什么:

x = 500 
x is 500 

返回 False,但是:

y = 100 
y is 100 

返回真值?