Use of super() in Constructor Inheritance – 2 || Constructor Inheritance || Python

In this we are going to see a program on Use of super() in Constructor Inheritance - 2 in Python Programming Language.


class power:
    def __init__(self):
        print(2**4)


class power2(power):
    def __init__(self):
        super().__init__()
        print(3**4)


p = power2()

# Coded by Saahil

#ENJOY CODING


Post a Comment

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

Previous Post Next Post