Python Functions · Part 2
LEGB scope; `nonlocal`; flexible argument packing; closures and higher-order previews.
Lesson 23 · Python Functions · Part 2 — Level II · Guide
October 29, 2026 · Bridge Academy Python Program
Learning goals
- Review LEGB scope. - Use nonlocal in closures. - Collect flexible inputs with args and *kwargs. - Preview higher-order functions.
Level II moves from simple scope rules to flexible function patterns. Students practice closures, argument packing, and function forwarding without losing the core idea of scope.
Preview truncated — download the notebook to see the full lesson.