https://towardsdatascience.com/a-comprehensive-guide-for-classes-in-python-e6bb72a25a5e

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/622d22d9-2e06-4a45-9e9e-ace41af6207e/1n9uQhN382419Tt5ejtm4Sw.jpeg

Photo by Alexander Schimmeck on Unsplash

We see a bunch of different clocks in this photo. They have different shapes, colors, and sizes. However, all of them are a type of clock. We can think of classes in Python in a similar way. A class represents a type (clock) and we can create many instances of that type (clocks in the photo above).

Object oriented programming (OOP) paradigm is built around the idea of having objects that belong to a particular type. In a sense, the type is what explains us the object.

The explanation of an object is of crucial importance for OOP. We need to have a comprehensive understanding of:

All these points that constitute the explanation of an object are defined with classes. Everything in Python is an object of a type such as integers, lists, dictionaries, functions and so on. We define a type of object using classes.

In this article, we will go over what class means, how a class is created and used in Python, and what kind of advantages we obtain by using classes. The outline is as follows:

What is a class in Python?

Classes possess the following information: