To check whether 2 variables or objects are identical you can use id() or is.
In [1]: a = object() In [2]: b = a In [3]: id(a) Out[3]: 139859518217472 In [4]: id(b) Out[4]: 139859518217472 In [5]: b is a Out[5]: True