How to check whether two variables reference the same object?
x = [\'a\', \'b\', \'c\'] y = x # x and y reference the same object z = [\'a\', \'b
That’s what is is for: x is y returns True if x and y are the same object.
x is y
True
x
y