id()
Returns a unique integer identity for an object during its lifetime (its memory address in CPython).
Easy
a is b is equivalent to id(a) == id(b).
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.