Category Python

Access Modifiers in Python

The modifiers which define the scope and visibility of class members (variables and methods) in object-oriented programming are called access modifiers in Python. These modifiers are also known as access specifiers. Python uses special notations, such as a single underscore…

Encapsulation in Python

An example of encapsulation in Python

The feature of wrapping up data (attributes) and methods associated with that data into a single unit is called encapsulation in Python. In any other programming languages or Python, this unit is a class. For example, scooter parts like engine,…

Single Inheritance in Python (with Example)

Single inheritance in Python

Single inheritance, as the name suggests, allows a class to inherit properties and behavior from a single parent class. In other words, when a child class inherits only a single parent class, it is called a single inheritance in Python.…