📜  python != - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:13.704000             🧑  作者: Mango

代码示例3
The == operator compares the values of both the operands and checks for value equality. Whereas is operator checks whether both the operands refer to the same object or not. ... Hence list1 and list2 refer to different objects. We can check it with id() function in python which returns the “identity” of an object.