-
Book Overview & Buying
-
Table Of Contents
Python Illustrated
By :
OOP is not something that’s specific to Python. All languages that support the creation of classes can be used to write code in the OOP style. The number one key building block to OOP is the concept of classes. This is not an easy concept, so please be patient and kind with yourself if you struggle to understand it at first.

A class can be seen as a blueprint for data, or a data type if you like. If we create a class, we specify two main things in there (don’t worry about how to do that just yet):
So, let’s say we create a class for cat. It could have attributes such as name, age, energy level, and color. And it could have methods such as play, eat, demand cuddles, and sleep on a laptop. This class would...