Diamond Shape Problem In Multiple Inheritance | Python Tutorials For Absolute Beginners In Hindi #66

Code as described/written in the video


class A:
    def met(self):
        print("This is a method from class A")

class B(A):
    def met(self):
        print("This is a method from class B")

class C(A):
    def met(self):
        print("This is a method from class C")

class D(C, B):
    def met(self):
        print("This is a method from class D")


a = A()
b = B()
c = C()
d = D()

d.met()




Be the first person to comment!

Comments(0)