파이썬 아이덴티티 연산자
파이썬 아이덴티티 연산자
동일성 연산자는 개체를 비교하는 데 사용됩니다. 개체가 동일한 경우가 아니라 실제로 동일한 개체이고 메모리 위치가 동일한 경우입니다.
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 |