OOP PYTHON | CLASSES AND OBJECTS WITH PYTHON OOP | PARAMETER NAMING WITH PYTHON OOP
⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡
OBJECT ORIENTED PROGRAMMING WITH PYTHON | CLASSES AND OBJECTS IN PYTHON OOP | PARAMETER NAMING IN PYTHON OOP |
by SOHAIB JAHANGIR
#object_oriented_programming #oop_with_python #classes_and_objects_in_oop #Parameter_naming_in_oop#python_object_oriented_programming
Python is an object oriented programming language.
Almost everything in Python is an object, with its properties and methods.
A Class is like an object constructor, or a "blueprint" for creating objects.
Class
A class is a collection of objects. A class contains the blueprints or the prototype from which the objects are being created. It is a logical entity that contains some attributes and methods.
To understand the need for creating a class let’s consider an example, let’s say you wanted to track the number of dogs that may have different attributes like breed, age. If a list is used, the first element could be the dog’s breed while the second element could represent its age. Let’s suppose there are 100 different dogs, then how would you know which element is supposed to be which? What if you wanted to add other properties to these dogs? This lacks organization and it’s the exact need for classes.
object oriented programming tutorial python,
object oriented programming python,
python classes and objects,