Skip to main content
HomePython

Course

Introduction to Object-Oriented Programming in Python

IntermediateSkill Level
4.8+
2,429 reviews
Updated 07/2025
Discover the fundamental concepts of object-oriented programming (OOP), building custom classes and objects!
Start Course for Free
PythonProgramming
3 hr
11 videos
37 Exercises
3,100 XP
25,517
Statement of Accomplishment

Create Your Free Account

Continue with GoogleShow more options

or


By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Loved by learners at thousands of companies

Group

Training a Team?

Try for Business

Course Description

Foundations of OOP

Delve into the fundamental concepts that form the foundation of object-oriented programming (OOP). You'll discover the core principles of classes and objects, learn how to define and instantiate objectives in Python and explore how to assign attributes during instantiation.

Inheritance

Expand your knowledge by mastering inheritance and creating subclasses that build on functionality defined in other classes. You'll distinguish between class-level and instance-level data, implement class methods, and customize the functionality of subclasses!

Equality, Exception Handling, and Best Practices

Explore the versatility of Python in handling object comparisons and discover techniques for effective string representation of objects, enabling human-readable outputs. Learn how to fortify your code against unexpected errors and enhance its reliability through exception handling. Understand the importance of error detection and graceful error recovery, ensuring a smoother execution of your programs. Acquire best practices for writing clean, maintainable, and Pythonic code that adheres to OOP principles.

Prerequisites

Writing Functions in Python
1

OOP Fundamentals

Learn what object-oriented programming (OOP) is, how it differs from procedural programming, and how it can be applied. You'll define your own custom classes containing methods, attributes, and constructors, and use them to create objects!
Start Chapter
2

Inheritance and Polymorphism

Discover two of OOP's core concepts: inheritance and polymorphism. Learn how to implement them to minimize code re-use and extend functionality, along with reviewing the differences between class-level data and instance-level data.
Start Chapter
3

Integrating with Standard Python

Introduction to Object-Oriented Programming in Python
Course
Complete

Earn Statement of Accomplishment

Add this credential to your LinkedIn profile, resume, or CV
Share it on social media and in your performance review
Enroll Now

Don’t just take our word for it

*4.8
from 2,429 reviews
86%
14%
1%
0%
0%
  • Deniss
    6 hours ago

  • David
    16 hours ago

  • Mayank
    17 hours ago

  • James
    18 hours ago

  • Luis Carlos
    20 hours ago

  • Kamil
    yesterday

Deniss

Mayank

Luis Carlos

FAQs

Is this course suitable for beginners?

It is beginner-friendly for Python users, but assumes basic Python knowledge such as writing functions and working with variables. No prior OOP experience is required.

What can I do after completing this course?

You will be able to design and build your own Python classes, use inheritance to organize reusable code, and handle custom exceptions, skills used in software development, data engineering, and building maintainable Python projects.

Which OOP concepts does this course cover?

The course covers classes, objects, constructors, inheritance, polymorphism, class versus instance data, object comparison, string representation, and custom exception handling.

Why learn object-oriented programming in Python?

OOP helps you write cleaner, more reusable code. It is widely used in Python libraries like pandas and scikit-learn, and is expected knowledge for software engineer and data engineer roles.

Does this course cover error handling?

Yes. Chapter 3 shows how to create and catch custom exceptions by applying inheritance, giving you control over how your programs respond to unexpected inputs or states.

Join over 19 million learners and start Introduction to Object-Oriented Programming in Python today!

Create Your Free Account

Continue with GoogleShow more options

or


By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Grow your data skills with DataCamp for Mobile

Make progress on the go with our mobile courses and daily 5-minute coding challenges.