1 >>>a=10 2 >>>b=10 3 >>>print(a is b) 4 True 5 >>>print(a is not b) 6 False 7 >>>b=20 8 >>>print(a is b) 9 False 10 >>>print(a is not b) 11 True 12 #is,判断两个标识符是否引用自同一个对象, a is b (10=10),那么 is 返回的结果就是1(True,真命题) 13 #is not,判断两个标识符是否引用自不同对象,a is not b (10≠10),那么is返回的结果1(False,假命题)
end