The process of creating a subclass of a class is called inheritance . All the attributes and methods of superclass are inherited by its subclass also. This means that an object of a subclass can access all the attributes and methods of the superclass.
Read moreShould I create classes in Python?
Classes are great if you need to keep state , because they containerize data (variables) and behavior (methods) that act on that data and should logically be grouped together. This leads to code that is better organized (cleaner) and easier to reuse.
Read moreCan you make a class in a class Python?
A class defined in another class is known as inner class or nested class . If an object is created using child class means inner class then the object can also be used by parent class or root class. A parent class can have one or more inner class but generally inner classes are avoided.
Read more