Built-in Functions
hash()
Return an integer hash value for a hashable object.
hash(object)
hash() returns a number Python uses to organize hashable values in sets and dictionaries. Equal hashable values should have the same hash within one run.
Parameters
| Name | Description |
|---|---|
| object | A hashable object, such as an integer, string, or tuple of hashable values. |
Returns
An integer hash value.
Try it
Run it and change it
number = 42 print(hash(number))