英文文档:
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.
说明:
立即学习“Python免费学习笔记(深入)”;
1. 返回对象的唯一标识符,用整数表示。在程序生命周期内,这个标识符常量是唯一的。
>>> a = 1 >>> id(a) >>> id(1.0) >>> a = 'some text' >>> id(a)
python怎么学习?python怎么入门?python在哪学?python怎么学才快?不用担心,这里为大家提供了python速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号