OOP in Python: by Intelligence Gateway
OOP in Python: by Intelligence Gateway
By
Intelligence Gateway
Object Oriented Programming
In Python, Object-Oriented Programming (OOPs) is a programming
paradigm that uses objects and classes in programming.
The concept of OOP in Python focuses on creating reusable code. This
concept is also known as DRY (Don't Repeat Yourself).
Why OOP is necessary?
What is Class?
• It is a blueprint.
• It is a model.
• It is a template.
Example:
Class contain two things:
• Attributes Class
• Behaviors
Object Object Object
What is Object?
Object is an instance of a class. When class is defined, only the
description for the object is defined. Everything in python like: Integers,
strings, floating-point numbers, even arrays, and dictionaries, are all
objects.