本文摘自php中文网,作者不言,侵删。
本篇文章给大家带来的内容是关于python中的id()函数及读取list的方法介绍(代码示例),有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助。
id(object)
Return the “identity” of an object. This is an integer (or long 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.
说起这个函数就需要先了解pyhton的变量存储机制了:
变量:是动态变量,不用提前声明类型。
相关阅读 >>
从此驾驭图表的神器matplotlib,Python强大的作图工具
更多相关阅读请进入《Python》频道 >>

Python编程 从入门到实践 第2版
python入门书籍,非常畅销,超高好评,python官方公认好书。