What is oops in python?
Programming paradigm is a way to classify programming languages based on their features. One language can be classified into multiple paradigms.
Python can be divide into multiple paradigms.
- Object oriented(oops)
In oops, we divide the things into objects.
Essential features of object oriented programming are:-
- Data Encapsulation
Classes- Classes are the blueprint of the object. You can think of classes as a general idea of a category of an object.
Data Encapsulation- It is a feature that binds together the data and function that manipulate the data. This keeps both data and method of a class or object safe from outside interference and misuse.
Inheritance- It is the feature that lets you create a new class from an existing class.
Overriding- It is a feature which lets you redefine a parent class method. Like the name suggests, you can override a parent class function or a method in the child class.
Polymorphism- In OOP, when each child class provides its own implementation of an abstract function in parent class, it’s called polymorphism.
This is all about oops in python.