Skip to content

Tag Archives: Python-OOP

There can be some functionality that relates to the class, but does not require any instance(s) to do some work, static methods can be used… Read More
Problem Statement: Write a program to build a simple Student Management System using Python which can perform the following operations: Accept Display Search Delete Update… Read More
Encapsulation is one of the fundamental concepts in object-oriented programming (OOP). It describes the idea of wrapping data and the methods that work on data… Read More
A class is a user-defined blueprint or prototype from which objects are created. Classes provide a means of bundling data and functionality together. Creating a… Read More
We can create a list of objects in Python by appending class instances to the list. By this, every index in the list can point… Read More
super() function in Python: Python super function provides us the facility to refer to the parent class explicitly. It is basically useful where we have… Read More
self represents the instance of the class. By using the “self”  we can access the attributes and methods of the class in python. It binds… Read More
Class attributes belong to the class itself and they will be shared by all the instances and hence contains same value of each instance. Such… Read More
In Python, getters and setters are not the same as those in other object-oriented programming languages. Basically, the main purpose of using getters and setters… Read More
What is Polymorphism: The word polymorphism means having many forms. In programming, polymorphism means the same function name (but different signatures) being used for different… Read More
Prerequisite: Object Oriented Programming in PythonLet’s write a simple Python program using OOP concept to perform some simple bank operations like deposit and withdrawal of… Read More
Constructors in PythonDestructors are called when an object gets destroyed. In Python, destructors are not needed as much as in C++ because Python has a… Read More
Prerequisites: Object-Oriented Programming in Python, Object-Oriented Programming in Python | Set 2 Constructors are generally used for instantiating an object. The task of constructors is to… Read More
Python setattr() method is used to assign the object attribute its value.  Python setattr() Function Syntax Syntax : setattr(obj, var, val) Parameters :  obj :… Read More
Python getattr() function is used to access the attribute value of an object and also gives an option of executing the default value in case… Read More

Start Your Coding Journey Now!