How super is used in multiple inheritance

How will be use super in case of multiple inheritance?

Hi @Avnish,

This Waleed from Educative. I am glad you reached out to us.

This is a very interesting question. The use of super() in multiple inheritance will depend on the order of arguments in the child class definition.

class C1(): 
    def hello(self):

class C2():  
    def hello(self):

class C3(C1, C2):
    def print_details(self):

obj = C3()

This program will print 1, since order of arguments is C1 and C2. If you switch the order of the arguments of C3 class definition to class C3(C2, C1), this program will print 2.

We hope Educative has inspired to further your learning.

Best Regards,
Waleed | Developer Advocate