Python Basics — Classes and Objects
An intuitive introduction to the concepts of Classes, Objects, Inheritance and Object-Oriented Programming
Complex is better than complicated ~ The Zen of Python
Many moving parts, combined in a clever box, is now one good tool!
Object-Oriented Programming
OOP is a programming language model in which programs are organized around objects, rather than functions and logic. Classes and Objects are core concepts of OOPs and we will be exploring both of them in this article.
(More details here)
Class
A class is a template/blueprint for creating objects. It provides the properties
(what all data an object can have — variables), and behavior
(things an object can do — methods).
Analogy
Think of a class as a blueprint of a house — it’s not a real physical house but just a specification with all the properties a house will have — rooms, floors, area etc.