x and y are two variables.
I can check if they are equal using x == y , but how can I check if they have the same identity?
Example:
x = [1, 2, 3] y = [1, 2, 3]
Now x == y is True, because x and y are equal, however x and y are not the same object.
I am looking for something like sameObject(x, y) which in this case should be false.
python equality
snakile Sep 05 '10 at 19:54 2010-09-05 19:54
source share