Python Modules
A module is a .py file you import and reuse. import math then math.sqrt(9) is 3.0. from math import sqrt lets you call sqrt(9) directly. Your own utils.py can be a module if it sits on the path. A package is a folder of modules (often with __init__.py).
import math brings the whole module namespace. from math import sqrt brings one name. If two modules have sqrt, import module keeps them apart: math.sqrt vs other.sqrt. Don’t star-import in real code.
Python Modules — output — 7.0 then 3.14159…. math is a real stdlib module.
import vs from-import difference.