Python Identity Operators
Python Identity Operators
Identiteitsoperateurs word gebruik om die voorwerpe te vergelyk, nie as hulle gelyk is nie, maar as hulle eintlik dieselfde voorwerp is, met dieselfde geheue ligging:
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 |