Back
In Python, how do you make a subclass from a superclass?
To make a subclass from a superclass you can use the below-mentioned code:-
class Class1(object): pass class Class2(Class1): pass
class Class1(object):
pass
class Class2(Class1):
Here Class2 is a sub-class of Class1.
30.9k questions
32.9k answers
500 comments
665 users