Instagram
youtube
Facebook

Q) What is inheritance in python? and how many types of inheritance is present in python

Answer:

Inheritance is a feature in object-oriented programming where a class can inherit the attributes and behavior from another class.

There are three types of inheritance in Python:

  • Single Inheritance: A class inherits from a single parent class.
  • Multiple Inheritance: A class inherits from multiple parent classes.
  • Multilevel Inheritance: A class inherits from a parent class, which itself inherits from another parent class.

  • 361 Views

FAQ

Years=[1994,1891,2010,1999,1700,1698,2004] code t…

count=0
years=[1994,1891,2010,1999,1700,1698,2004]
for i in years:
   if(i%4==0 and i%100!=0 o…

ImportError: DLL load failed while importing _cex…

To solve this error you can use . This error came when i worked on matplotlib in python. This is th…

Program to swap variables in python

A program in Python that allows two variables to swap values.

def swap(x, y):

   temp = x
…