is:判断两个变量的id是否相等
==:判断两个变量的值是否相等
>>> s1 = 'ryan is my hero' >>> s2 = 'ryan is my hero' >>> print(s1==s2) True >>> print(id(s1),id(s2)) 1499122832304 1499122840432
>>> print(s1 is s2) False