7554425D-0054-440D-B95E-D2ABC13D62CD Created with sketchtool.
Your Saved Info Packages

View your saved Course or Program Packages containing pricing and detailed curriculum.

Speak with a Learning Advisor.

Have any questions? We'll call you.

Fill out the form below and a Learning Advisor will reach out at a time convenient for you.

Please pick a valid date and time between 9 AM and 8 PM eastern (Monday to Friday)

By clicking "Book a call," you accept our Terms and will also receive exclusive offers and updates about new courses, workshops and events.

Python Tutorial

Python Class Inheritance

Ready to start your career in Data? Find out more about BrainStation's Python Course

One of the many features Object Oriented Programming (OOP) languages provides is Inheritance. Just like the name suggests, it is a way for taking a Python class as a parent or base class and creating different Python child classes from it that will inherit all the attributes and methods of the parent or base class. It is very useful in sharing common attributes and methods across multiple classes.

Inheritance can be implemented by adding the parent class name inside parentheses while creating a child class.

class ParentClass:
	'''A docstring like this explains what the parent class does'''

class ChildClass(ParentClass):
	'''A docstring like this explains what the child class does'''
Set Password

You already have an account with BrainStation, but you still need to set up a password.