Category Python

Static Variable in Python

Static variable in Python

When we define a variable inside a class definition, but outside any of class’s method definitions, it is called static variable in Python. In other words, a variable that is mutually shared by all the instances (objects) of a class…

What is Self in Python

Self parameter in Python

Self in Python is a reference to the current instance of the class itself (i.e. object created from the class). In Python, every object has an address. When we create an instance of a class, memory is allocated and data…

What is Object in Python

Realtime example of object in Python

We know that Python is an object-oriented programming language that allows us to design our code through classes and objects. In accordance with the concepts of OOPs, a class is a template or blueprint of an object. It provides the…

Class in Python (with Examples)

Realtime example of class in Python

In this tutorial, we will learn about class in Python with the help of real-time examples. In Python or any other object-oriented programming languages, classes are the fundamental feature of OOPs concept. Classes provide a way to create objects that…