Parent __init__ with and without super()
Predict the outputEasy-MediumPython only
class A:
def __init__(self):
print("A init")
class B(A):
def __init__(self):
super().__init__()
print("B init")
class C(A):
def __init__(self):
print("C init")
B()
C()
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.