Here’s the differnce between a module, a package and library in Python.
- Module
- A single file that contain Python codes, functions, classes, etc.
import my_module
- Package
- A collection of
modulesstored in a directory. - Every
packagecontains a__init__.pyfile. - Library
- Refers to a collection of
modulesandpackages.
