Glossary

Forgetting `return`

function prints instead of returning, caller gets `None` 2. **Mutable default argument** — `def f(items=[])` shares the list across calls; use `None` instead 3. **Scope confusion** — assigning to a name inside a function creates a local, potentially shadowing a global

Learn More

Related Terms