© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
K. WilsonThe Absolute Beginner's Guide to Python Programminghttps://doi.org/10.1007/978-1-4842-8716-3_9

9. Object-Oriented Programming

Kevin Wilson1  
(1)
London, UK
 

Python is an object-oriented programming language. This means that the program design is based around objects, rather than functions and logic.

Each object is created using a blueprint known as a class . Each class has attributes to contain the data an object needs to work with.

Each class also contains functions, called methods that perform operations on objects.

An object is an instance of a class. So, you could have a class called “car” and use it to define an object called “merc.”

You’ll need ...

Get The Absolute Beginner's Guide to Python Programming: A Step-by-Step Guide with Examples and Lab Exercises now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.