id(object) -> integer
Return the identity of an object. This is guaranteed to be unique among
simultaneously existing objects. (Hint: it's the object's memory address.)
使用:
id(obj)
id(obj)
得到obj
的内存地址(10进制)
>>> sq = [0, 1, 2]
>>> print id(sq)
4345610824