How would you implement inheritance in python?



How would you implement inheritance in python?..

Answer / Varun Kumar Sambhalwal

In Python, inheritance is implemented using the 'class' keyword. The class that inherits from another class is called a subclass (child), and the class being inherited from is called a superclass (parent). Here's an example: class Child(Parent): # defines a child class that inherits from Parent

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

In python, are there any databases to DB packages?

1 Answers  


Why is not all memory freed when Python exits?

1 Answers  


What are the list methods in python?

1 Answers  


What is the difference between a function and a method python?

1 Answers  


Are there arrays in python?

1 Answers  


Is there any tool used to find bugs or carrying out static analysis?

1 Answers  


How does mro work in python?

1 Answers  


Can I use python instead of javascript?

1 Answers  


What are “special” methods in python?

1 Answers  


Can a class be static?

1 Answers  


What are the types of functions in python?

1 Answers  


What is typecasting in python?

1 Answers  


Categories