Why would you want to inherit a class for another class in Python?
Experience Level: Junior
Tags: Python
Answer
You inherit one class for another class when you want the new class have same or similar methods as the original class together with some some new methods that define additional behavior of the class.
Inheritance is a concept of object oriented programming (OOP).
Related Python job interview questions
What is a Set data type good for in Python?
Python JuniorHow do you inherit one class from another class in Python?
Python JuniorWhat does strftime stand for in Python?
Python JuniorWhat does strptime stand for?
Python JuniorHow do you convert string to a strongly-typed datetime in Python?
Python Junior