PythonID演算子
PythonID演算子
ID演算子は、オブジェクトが等しい場合ではなく、実際には同じオブジェクトであり、同じメモリ位置にある場合に、オブジェクトを比較するために使用されます。
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 |