How does inheritance work in python?
How do you access parent members in the child class?
What is init method in python?
The __init__ method in Python is a special method called a constructor, which is automatically called when an object of a class is created. It is used to initialize the attributes of the object and perform any setup that is required when the object is instantiated. The __init__ method can accept any number of arguments, which can be used to set the initial values of the object’s attributes. It is defined within a class and has the special name __init__ (with double underscores before and after the word “init”).
How will you check if a class is a child of another class?
This is done by using a method called issubclass() provided by python. The method tells us if any class is a child of another class by returning true or false accordingly.
We can check if an object is an instance of a class by making use of isinstance() method