本文目录
英文文档
id()
小结
英文文档
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.
id()
1、返回对象的唯一标识符,用整数表示。在程序生命周期内,这个标识符常量是唯一的。
>>> id(1) 1396814912 >>> a = 1 >>> id(a) 1396814912 >>> id(1.0) 33561240 >>> a = 'python' >>> id(a) 49270488 小结
希望通过上面的操作能帮助大家。如果你有什么好的意见,建议,或者有不同的看法,我都希望你留言和我们进行交流、讨论。
欢迎关注微信公众号,谢谢大家支持:AiryData。
转载请注明:数据之美 Python3.6内置函数(31)——id()
喜欢 ( 0) or 分享 (0)