how to inherit a class in python
class awwab(object):
def __init__(self, name, age):
self.name = name
self.age = age
def speak(self):
print("Hello, my name is",self.name,"and I am",self.age,"years old!")
awwabasad = awwab("Awwab Asad", 11)
print(awwabasad.speak())
class naail(awwab):
def __init(self, name, age):
super().__init__(self, name, age)
naailasad = naail("Naail Asad", 8)
print(naailasad.speak())