The hash() method returns the hash value of an object if it has one. Hash values are just integers which are used to compare dictionary keys during a dictionary lookup quickly. Internally, hash() method calls __hash__() method of an object which are set by default for any object.