Basic computer course, C programming language, Education, Engineering Course, Engineering Courses, Maths Coaching, online computer coaching, PGDCA course coaching, programming course, school computer coaching, training, Uncategorized, Web Design course

Inheritance in Python –


Inheritance is the mechanism to build a new class from old class. So, new class can access the data property of old class.

Old class is called parent class and new class is called child class.

What can child class can do?

-Child calls can reuse data or function of parent class.

-Child class can redefine function of parent class.

-Child class can add own data also.

python inheritance at tcci

Programming Structure of Inheritance:

class parent:


…..def fun1(self):


class child(parent):

….data declaration

….def fun2(self):





Here, obj is instance created for the class child. We can call fun of parent and child both using this instance of child class.

There are types of inheritance depending number of parent and child.

1. Single inheritance

2. Multilevel inheritance

3. Multiple inheritance

4. Hierarchy inheritance

5. Hybrid inheritance

To learn more about inheritance, Python, Programming Language, TCCI.

Call us @ 9825618292

Visit us @


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s