hash(object)
Return the hash value of the object (if it has one). Hash values are integers.
They are used to quickly compare dictionary keys during a dictionary lookup.
Numeric values that compare equal have the same hash value (even if they are of different
types, as is the case for 1 and 1.0).
先看定义:
hash()
与id()
相关,id(obj)
即取得对象的内存地址,所以这个数字的大小每次运行都不一样,但是对于内置类型:PS: 提到id还有个有趣的
小整数对象池
的概念: