Python Identity Operators
Identity operators are used to compare the objects,not if they are equal,but if they are actually the same object,with the same memory location.
Types of Identity Operators
Name | Description | Example |
---|---|---|
is | Returns true if both variables are the same object | a is b |
is not | Returns true if both variables are not the same object | a is not b |