Scope is all about the location and the scale of things and their life span. And namespaces are the mechanism to achieve this in Python. In this tutorial you learn how scopes an namespaces work, how variables are resolved, how to make namespaces and why the global and nonlocal keywords can be dangerous.