Write short note on from-import statement.
Question :
Write short note on from-import statement.
Instead of importing the whole module into the namespace, Python provides the flexibility to import only the specific attributes of a module. This can be done by using from import statement.
The syntax to use the from-import statement is given below:
from < module-name> import <name 1>, <name 2>.., <name n>