Inheritance (Python)

Inheritance lets one class (the child) reuse and extend the attributes and methods of another class (the parent). You write it by putting the parent class in…