Answers for "inherit init method"

0

inherit init method

class Parent:
        def __init__(self,x):
                self.x = x

class Child(Parent):
        def __init__(self,x, y):
                super().__init__(x)
                self.y = y
Posted by: Guest on May-22-2021

Python Answers by Framework

Browse Popular Code Answers by Language