What is the output of the following Python code snippet?
class Point:
def __init__(self, x, y):
self.x, self.y = x, y
def __repr__(self):
return f'Point({self.x}, {self.y})'
print(Point(1, 2))
def __init__(self, x, y):
self.x, self.y = x, y
def __repr__(self):
return f'Point({self.x}, {self.y})'
print(Point(1, 2))
Correct answer
D. Point(1, 2)
5 views