Inheritance and Composition: A Python OOP Guide

In this course, you’ll explore inheritance and composition in Python. Inheritance and composition are two important concepts in object oriented programming that model the relationship between two classes. They are the building blocks of object oriented design, and they help programmers to write reusable code.

By the end of this course, you’ll know how to:

  • Use inheritance in Python
  • Model class hierarchies using inheritance
  • Use multiple inheritance in Python and understand its drawbacks
  • Use composition to create complex objects
  • Reuse existing code by applying composition
  • Change application behavior at run-time through composition

What’s Included:

Downloadable Resources:

Related Learning Paths:

About Austin Cepalia

Austin is a video tutorial author at Real Python. He's currently a student working towards a degree in computer science at Rochester Institute of Technology.

» More about Austin

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

Participant Comments

Avatar image for madpenguin07

madpenguin07 on Nov. 25, 2022

Awesome course, clear and comprehensive. I will certainly be returning for another view. Thanks for putting the course together.

Avatar image for taylorchris121

taylorchris121 on May 15, 2021

Thankyou, it’s quite comprehensive, very informative!

A great course to really get your teeth into!!

Avatar image for kbram

kbram on June 20, 2020

Thanks for a great course, Austin. I learned a ton of new stuff and have to watch at least one more time to pick up the details.

Avatar image for Ronald Fenimore

Ronald Fenimore on May 5, 2020

Very good course. I have already gone through twice, the second time I used the pause button frequently and also backup and went back through some sections. I am sure I will be revisiting this course as well as the tutorial. Looking forward to seeing those files for downloading. Thanks for a job well done.

Avatar image for fjavanderspek

fjavanderspek on May 1, 2020

Thanks for the great videos! I like that you ask us questions so we can test our understanding. This really fortifies the understanding we have, exposes gaps we may still have, and helps commit the information to memory! Keep it going :D

Avatar image for dejiok

dejiok on April 18, 2020

This is by far the best course on this subject. Excellent, needs going over and over again.

Avatar image for latedeveloper

latedeveloper on April 17, 2020

Superb course; I will be going back to this time and again. I am about a year into my Python journey and this course appeared at just the right moment.

« Browse All Courses