Python Identity Operators
Categories: Python
Identity operators compare the memory locations of two objects. There are two Identity operators explained below −
OperatorDescriptionExample isEvaluates to true if the variables on either side of the operator point to the same object and false otherwise.x is y, here is results in 1 if id(x) equals id(y). is notEvaluates to false if the variables on either side of the operator point to the same object and true otherwise.x is not y, here is not results in 1 if id(x) is not equal to id(y).