参考官方链接:https://docs.python.org/3/library/functions.html#id
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 same id()
value.
CPython implementation detail: This is the address of the object in memory.
id
(object)这个函数返回的是对象在内存中的存储地址
>>> a= 5
>>> id(a)
140734697375520
PS:python的全部内置函数的官方链接:https://docs.python.org/3/library/functions.html