Which special method makes two objects comparable with == in Python?
Correct answer
A. __eq__
6 views
A. __eq__
6 views
__eq__ defines equality comparison.
Asked in: Python Interview OOP
https://docs.python.org/3/tutorial/classes.htmlNot sure why the answer is A? Ask here and get an explanation.