Learn Python
WIP Advanced Python
8.1
Lesson

WIP-Identity Operators

Identity operators are used to checking whether both the variables are stored in the same memory locations. If the values of the two variables are equal it doesn’t mean their memory locations are the same. The two identity operators is and is not are explained in the below table. Identity and equal to (==) operators are similar but not the same.

Operation Operators Result Description
Comparison is TRUE If both the operands are stored in the same memory locations
Comparison is not TRUE If both the operands are stored in the different memory locations