Class Inheritance Python || Parent Child || Single Inheritance || Python
In this we are going to see a basic program of parent child inheritance using single inheritance in Python Programming Language.



class Parent():
    def __init__(self):
        print("Parent Class")
    def parentSay(self):
        print("Calling")
class Child(Parent):
    def __init__(self):
        print("Child Class")
    def childSay(self):
        print("Answering")

p = Parent()
c = Child()
c.parentSay()
c.childSay()

# Coded By Dhiraj Shelke


#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post