English document:
##hash<a href="http://www.php.cn/wiki/739.html" target="_blank"></a>
(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) .
Instructions:
1. Return the hash value ofobject, using integer express. Hash values can be used to quickly compare key values during dictionary lookups.
>>> hash('good good study') 1032709256
>>> 1.0 == 1 True >>> hash(1.0) >>> hash(1) >>> hash(1.0000)
The above is the detailed content of Detailed introduction to Python's built-in hash function. For more information, please follow other related articles on the PHP Chinese website!