class M and F are two standalone classes. Class C inherits both F and M . I don't understand why the super() keyword of class F is calling the init of class M . Can someone explain the working behind this code?
class M:
def __init__(self):
print("M constructor")
class F:
def __init__(self):
print("F constructor")
super().__init__()
super().__init__()
class C(F,M):
def __init__(self):
super().__init__()
print("C constructor")
C()
The O/P
F constructor
M constructor
M constructor
C constructor