4 ms·
In Python, the actual equality testing operator is `is`, not `==`. The fundamental property of equality is that equal objects can't be distinguished in any way.
by catnaroek 10y ago
In Python, the actual equality testing operator is `is`, not `==`. The fundamental property of equality is that equal objects can't be distinguished in any way. (Indiscernibility of identicals, aka Leibniz's principle.)
xs = [1,2,3]
ys = [1,2,3]
# are xs and ys equal?
ys.append(4)
print(xs == ys)
# no!