Diamond shape in classes in python
class A:
def met(self):
print("This is a mothod from class A")
class B(A):
def met(self):
print("This is a mothod from class B")
class C(A):
def met(self):
print("This is a mothod from class C")
class D(C, B):
def met(self):cx
print("This is a mothod from class D")
a = A()
b = B()
c = C()
d = D()
d.met()
Comments
Post a Comment