Module
A single Python file (or package) loaded with import to reuse code.
- A .py file or a directory with __init__.py.
- Module names map to file paths via sys.path.
- venv changes which modules are reachable.
When to use: Anywhere code reuse spans files; debugging ModuleNotFoundError.
Example: import numpy as np creates a local alias. from .utils import load_data is a relative import.