Hi Guest

MobileUser

1 HomePage 1 Jobs 1 WalkIn 1Articles  

Cat Exam

 :) Latest Topic
AJAX
VB.NET
SQL Query
UDDI
CLASS
JavaScript Questions
SharePoint Interview
SilverLight
WCF
general knowledge
 ASP.NET
 :) Hot Jobs
 
 :) Latest Articles


  

 


Define Inheritance in Python with some examples?
Question Posted on 24 Oct 2021

Home >> Python Programming >> Python Questions >> Define Inheritance in Python with some examples?




Define Inheritance in Python with some examples?
As we knows Python is object-oriented programming paradigm and classes in Pyhton have ability to inherit the properties of another class. And this process is called inhertitance. Inheritance provides the code reusability feature. The class that is being inherited is called a superclass or the parent class, and the class that inherits the superclass is called a derived or child class. Below are types of inheritance as given in Picture:-


Python OOPS
(1)Single inheritance:-In python when a class inherits only one of superclass.
(2)Multiple inheritance:-In Python when a class inherits multiple superclasses.
(3)Multilevel inheritance:-In Python when a class inherits a superclass and then another class inherits this derived class forming a ‘parent, child, and grandchild’ class structure.
(4)Hierarchical inheritance:-In python when one of the superclass is inherited by multiple derived classes.
0
0



 
 Input Your Comments Or suggestions(If Any)
 Name
 Email(optional)
 Comments


Other Important Questions
Program to check sequence is palindrome or not?
Can you define Memory Management in Python?
Can you define dictionary in Python?
Can you please mention some builtin Data Types in Python?
Write a code to read JSON file and print data of JSON in Python?






 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |