Python Identity Operators
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:
Operator | Description | Example | Try it |
---|---|---|---|
is | Returns true if both variables are the same object | x is y | Try it » |
is not | Returns true if both variables are not the same object | x is not y | Try it » |
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.