Importing a module
In python, in order to use a module, it has to be imported. Python provides multiple ways to import modules in a program :
- To import the entire module :
import module_name
- To import only a certain portion of the module :
from module_name import object_name
- To import all the objects of the module :
from module_name import *
Basics Of Python Modules
A library refers to a collection of modules that together cater to a specific type of needs or application. Module is a file(.py file) containing variables, class definitions statements, and functions related to a particular task. Python modules that come preloaded with Python are called standard library modules.