Python provides a simple way to work with files. Whether it is reading from or writing to a file, Python has easy-to-use built-in functions to …
User-Defined Exception in Python
We have learned about Exception in the article Errors and Exceptions in Python. Then, handling Exceptions was introduced in the article Handling exceptions in Python. …
Operators overloading in Python
1. What is operator overloading? Python provides many types of operators to manipulate the data types supported by Python. An operator performs different actions on …
Encapsulation and Polymorphism in Python
1. Encapsulation in Python Encapsulation is one of the essential features of object-oriented programming. The goal is to guarantee that the class contains all the …
Multiple Inheritance in Python
1. Multiple Inheritance in Python A child class can inherit from more than one parent class. This is multiple inheritance. The child class inherits all attributes …
Inheritance in Python
1. Inheritance in Python Inheritance is one of the important features of object-oriented programming. This feature refers to defining a new class based on an …
The __init__() constructor function of a class in Python
In this article, we will learn about the constructor function of a class in Python. This is the next article after Building class and creating …
Handling exceptions in Python
1. Handling exceptions in Python with try statement When an exception occurs in Python, the program will stop suddenly and display an error message. To …
Building class and creating object in Python
1. Python is an object-oriented programming language Python is an object-oriented programming language (OOP). It is common to build classes and create objects in Python. …
Errors and Exceptions in Python
With errors and exceptions in Python, we will encounter errors when programming as well as when running programs. In Python, we can divide errors into …