The Python Tutorial: More Control Flow Tools - Defining Functions, Python Software Foundation, 2024 (Python Software Foundation) - This section of the official Python documentation offers a clear introduction to functions, covering local variables and the global keyword.
Fluent Python, 2nd Edition, Luciano Ramalho, 2022 (O'Reilly Media) - This book presents a comprehensive guide to Python, including detailed discussions on scope rules, closures, and the LEGB rule, aiding a more complete understanding.