multi-level inheritance and multiple inheritance



class A(object):pass
class B(A):pass
class C(B):pass

#The above example shows multi-level inheritance,





class A(object): pass

class B(object):pass

class C(A,B):pass





#The above example shows multiple inheritance.





#If a single class inherits from two or more classes then it is called Multiple inheritance.

No comments:

Post a Comment