Modules in Python in Hindi by Learning Everyday

Modules in python , A module in python is a file containing Python definitions and statements. A module in python allows you to logically organize your Python code. Grouping related code into a module makes the code easier to understand and use. A module is a Python object with arbitrarily named attributes that you can bind and reference. A Python module is a Python file containing a set of functions and variables to be used in an application. The variables can be of any type (arrays, dictionaries, objects, etc.)
A module in python can be defined as a python program file which contains a python code including python functions, class, or variables. In other words, we can say that our python code file saved with the extension (.py) is treated as the module. We may have a runnable code inside the python module.
You can create module in python in easy way, just create a python file and put desired python code in the file. Modules in python can be imported in any python program using import statement.
Modules in Python provides us the flexibility to organize the code in a logical way.
To use the functionality of one module into another, we must have to import the specific module.
How to Create a Module in python. 
To create a module, create a Python file with a .py extension.
How to Call a Module in python
Modules created with a .py extension can be used in another Python source file, using the import statement.
Music http://www.bensound.com
Like us on fb http://www.facebook.com/learningseveryday
Our Blog http://www.ethtimes1.blogspot.com
http://www.pythonqns.blogspot.com

Comments

Popular posts from this blog

Database Project Ideas for Beginners | DBMS Project Ideas for Beginners