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 »

Python File handling

Python Modules

A group of functions, class and variables that are saved in a file, that file refers as Python modules. In Python each file with. By extension, is considered as a module. Python modules are used to divide a large program in sub program and divide a program according to similar function. The module is also …

Python Modules Read More »

Python File handling

Python Variables Scope

Variables scope means the accessibility of the variables in the program. This means in which part of the program allows to access those variables. Python Variables Scope Divided Into Two Types Global variables Local variables Global Variables The variables which are declared outside the all the functions are called global variables. Global variables can be …

Python Variables Scope Read More »