What is OOP?

<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>

Untitled

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.

What is Class?

Implementation

Class

class ClassName
		# Statement-1
		# Statement-N
# Defining class
class Dog:
	pass

Object

obj = Dog()