English documentation:
id(object)
Return the “identity” of an object. This is an integer which is guaranteed to be unique and constant for this object during its lifetime. Two objects with non-overlapping lifetimes may have the sameid() value.
CPython implementation detail: This is the address of the object in memory.
Description:
1. Return the unique identifier of the object, expressed as an integer. This identifier constant is unique during the lifetime of the program.
>>> a = 1 >>> id(a) >>> id(1.0) >>> a = 'some text' >>> id(a)