21
What is the purpose of the __eq__() method in Python classes?
Answer & Solution
Answer: Option
B
Solution:
The __eq__() method defines how instances of a class are compared for equality using the == operator.