>>> a=10
>>> b=10
>>> a is
b
True
>>> c=10.0
>>> d=10.0
>>> c is
d
False
>>> a==b
True
>>> c==d
True
>>> id(c)
47464176
>>>
id(d)
47460624
>>> id(a)
505911152
>>>
id(b)
505911152
Python中is和==的区别,布布扣,bubuko.com
原文:http://www.cnblogs.com/timp/p/3662842.html