Question OOP-ENC-0061
HardWhat is the output of this code?
class A:
def __init__(self):
self.__v = 1
class B(A):
def __init__(self):
super().__init__()
self.__v = 2
b = B()
print(sorted(k for k in vars(b)))
- A.
['_A__v']
- B.
['__v']
- C.
Sign up free to see the answer and a step-by-step explanation.