I have the following python code
class A:
def __init__(self):
print("A", end=" ")
super().__init__()
class B:
def __init__(self):
print("B", end=" ")
super().__init__()
class C:
def __init__(self):
print("C", end=" ")
super().__init__()
class D(A, B, C):
def __init__(self):
print("D", end=" ")
#B.__init__(self)
A.__init__(self)
#super().__init__()
if __name__ == "__main__":
D()
The output of this code peer to my understanding had to be
D A
But the output is
D A B C
And if I remove the super().__init__() part in class A, I get the following result
D A
My question is, why does the initialization of B and C occur when super().__init__() is placed in class A? As I know, super method is for accessing the parent class, but in this case it seems to be responsible for something else.