Question from the Python - Fundamentals test

What will be the result of the following code?

Easy

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 277 times
Edit
2
Community EvaluationsNo one has reviewed this question yet, be the first!