PYTHON_101 | PYTHON IDENTITY OPERATORS
-->
SMARS Learning Platform
100% Complete
PYTHON_101 | PYTHON IDENTITY OPERATORS
| Operator | Description | Example |
|---|---|---|
is |
Evaluates 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 not |
Evaluates 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). |