Question OOP-CLS-0046
MediumWhat is the output of this code?
class T:
def __init__(self, v):
self.v = v
a = T(1)
b = a
b.v = 7
print(a.v, a is b)
- A.
7 True
- B.
1 True
- C.
1 False
- D.
7 False
Sign up free to see the answer and a step-by-step explanation.