Python Programming - Objects - Discussion

Discussion Forum : Objects - General Questions (Q.No. 24)
24.
In Python, what is the purpose of the __hash__ method in a class?
To create a hash value for the object
To check if two objects are equal
To delete the class object
To serialize the object
Answer: Option
Explanation:
The __hash__ method is used to define the hash value for an object. It is called by functions like hash().
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.