Home >>Python Built-in Functions >Python hash() Function
Python hash() function is used to encode the data into unrecognisable the hash value. It calculates the hash value by using the hash algo. The hash is an integer value used to compare dictionary keys during a dictionary lookup.
Syntax:hash(obj)
Parameter | Description |
---|---|
obj: | This parameter defines the object which we need to convert into hash. |
x = 'Abhimanyu'
print (hash(x))
x = '100.43'
print (hash(x))