Question OOP-POLY-0066
HardWhat is the output of this code?
class A:
def __eq__(self, o): return True
__hash__ = None
a, b = A(), A()
try:
print(a == b, len({a}))
except TypeError:
print(a == b, "unhashable")
- A.
True unhashable
- B.
True 2
- C.
False unhashable
- D.
True 1
Sign up free to see the answer and a step-by-step explanation.