Python Hash


Hash function

The hash(object) function return an integer value of the object. The returned values are used to compare dictionary keys during a dictionary search.

Examples

Example 1

	
>>> x = 2
>>> hash(x)
2
>>> y = -3
>>> hash(y)
-3
>>> z = 2.40
>>> hash(z)
1288489781
>>>