Operadores de identidad de Python
Operadores de identidad de Python
Los operadores de identidad se utilizan para comparar los objetos, no si son iguales, sino si en realidad son el mismo objeto, con la misma ubicación de memoria:
Operator | Description | Example | Try it |
---|---|---|---|
is | Returns true if both variables are the same object | x is y | |
is not | Returns true if both variables are not the same object | x is not y |