<aside> 💡 In Python, object-oriented programming (OOPs) is a paradigm programming where it is using object and class in programming.
The purpose to implement the real-world entity such as inheritance, polymorphism, encapsulation, etc. in programming.
</aside>
The main concept of OOP is to tie data and function that cooperate together as one united so there is no other part from the code that can access this data.
Class in a group of objects. Class consists of blueprint or prototype where the object is made. This is the logic entity consist of some attribute and methods.
To understand the importance of creating class, let’s consider an example. Let’s say we want to track number of dogs that may have different attributes such as race and age. If list is utilized, the first element can be dog race while the second element can represent the age.
class ClassName
# Statement-1
# Statement-N
# Defining class
class Dog:
pass
obj = Dog()