Question from the Python - Fundamentals test

What will be the result of the following code?

Medium

What will be the result of the following code?

class A:
    def __init__(self, x):
        self.x = x

    def __eq__(self, other):
        return self.x == other.x

a = A(10)
b = A(10)
print(a == b)
print(a is b)

Author: Amani BEN HADJ BRAIEKStatus: PublishedQuestion passed 9 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!