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

PyTamaro logo

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

Privacy Policy • Platform Version c67fb165 (October 16, 2026 at 2:45:13 PM UTC)