def __init__(self):
print(1)
class B(A):
def init (self):
super().__init__()
print(2)
obj = B()
Result:
1
why it didn't print 2?
What did super() do?
Can someone explain this to me.... I expected it would print 1 as well as 2....anyone?
Обсуждают сегодня