Equality versus identity in Python
Briefly

Python's == operator checks for equality. Two objects are equal if they represent the same data.
Python's is operator checks for identity. An object is only ever identical to itself.
Python's equality operator checks the value of two objects. The == operator asks whether they represent the same value.
Python's identity operator doesn't look at objects but focuses on object locations. The id function provides a unique ID for each object.
Read at Pythonmorsels
[
add
]
[
|
|
]