0

What is modules in python? Why we use it?

Need the full details...

10th Dec 2017, 12:22 PM
bikash behera
bikash behera - avatar
2 Answers
+ 19
A module 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. Simply, a module is a file consisting of Python code. A module can define functions, classes and variables. A module can also include runnable code.
10th Dec 2017, 12:37 PM
💞⓱ⓩⓐⓣⓘ💞
💞⓱ⓩⓐⓣⓘ💞 - avatar
+ 9
Modules in Python are simply Python files with the .py extension, which implement a set of functions. Modules are imported from other modules using the import command. ... The first time a module is loaded into a running Python script, it is initialized by executing the code in the module once https://docs.python.org/3.3/tutorial/modules.html
10th Dec 2017, 12:26 PM
GAWEN STEASY
GAWEN STEASY - avatar