Documentation

Function defined in library builtins

hash(object)

hashobject

Returns the hash value of an object.

Hash values are integers used to quickly compare objects (e.g., keys in a dictionary when doing a lookup).

objectobject to compute the hash value for

Hash value of the object
Code
hash('Python')
Result
7659224494485679784
Code
hash('python')
Result
-8305685934456145759

See also hash in the official documentation

Logo of PyTamaro

PyTamaro is a project created by the Lugano Computing Education Research Lab at the Software Institute of USI

Privacy PolicyPlatform Version 9b738ccd (Fri, 18 Sep 2026 16:05:51 GMT)