- A folder of python programs (modules) is a package of modules.
- A package can have subfolders and modules.
- To import a package, __init__.py file must be present in each of the folders, subfolders.
- A import statement can import packages and each import package introduces a namespace.
Syntax:
========
import folder1.subfolder2.module1
OR
from folder1.subfolder2.module1 import names
OR
from folder1.subfolder2.module1 import names
No comments:
Post a Comment