Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you may not be able to execute some actions.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
a1 = [1,1,2] a2 = a1 a1 == a2 # Out[21]: True a1 is a2 # Out[22]: True a3 = a1.copy() a3 is a1 # Out[24]: False a3 == a1 # Out[25]: True
==在Python中是判断是否相等,比较两个对象中的值是否相等。==调用的对象__eq__()方法
==
__eq__()
is则是判断两个对象是否相同,是否是同一个对象。
is
与 Dian 的连接断开,我们正在尝试重连,请耐心等待