Python File handling

Encapsulation in Python

Encapsulation is a mechanism where data members and methods are bind or wrap together. For example. we take a class and we put variables and methods in the class, so class is binding variables and methods together, here class is encapsulation. The variables and methods of a class is known as members of the class. …

Encapsulation in Python Read More »

Python File handling

Python File Handling

File handling is an important concept in any programming language. File handling allows the developer or programmer to store the details in non-volatile memory. The file is the common permanent storage area to store the data. In python File handling-related operations allow developers to create new files, open existing files, read and write data from …

Python File Handling Read More »

Python File handling

Python Class & Object

The entire OOPs methodology has been derived from an Object which is root concept of OOP. An Object is anything which have real world existence and can be differentiate from each other by means of behavior or appearance. For Example, a table, a car, a pen, a person etc. It is possible that some objects …

Python Class & Object Read More »

Python File handling

Python Object Oriented Programming

Python supports different programming approaches to perform a task. Python use classes and objects in their program so it called an Object Oriented Programming Language. It divide main task into several sub tasks and it represent as classes. A Class represents common behavior of a group of objects which have similar behavior. For example, all …

Python Object Oriented Programming Read More »

Python File handling

Python main function

An every program in programming languages starts their execution of the main () function, but Python doesn’t have main function, but we can achieve functionality main function using __name__ special python variable. For every Python program python interpreter will add a special variable __name__ internally. This variable store information regarding whether the program is executed …

Python main function Read More »

Python File handling

Python Packages

The python packages mean folder or directory which represents a collection of Python modules. It is an encapsulation mechanism to group related modules into a single unit. Before understand package must need a some knowledge about Python modules. Any folder or directory contains file, is considered as a Python package. This file can be …

Python Packages Read More »