How does inheritance work in python?
Answer / Kalpana Bharti
Inheritance in Python allows one class (the subclass or derived class) to acquire the properties and methods of another class (the superclass or base class). To create a subclass, use the 'class' keyword followed by the name of the new class, and then '(superclass)' with a colon. Subsequent property and method definitions within the subclass will be created as extensions to those already in the superclass.
| Is This Answer Correct ? | 0 Yes | 0 No |
Why do lambda forms in python not have the statements?
Is cython as fast as c?
What is tkinter?
Is python zero indexed?
Is indentation required in python?
Is python scripting easy to learn?
What is the python decorator?
Explain about pdb module in python?
How will you find, in a string, the first word that rhymes with ‘cake’?
Is true a keyword in python?
What is the use of dir() function?
Do sets, dictionaries and tuples also support comprehensions?