Concept Flow - Built-in scope
Start: Code runs
Look for variable in Local scope
Found?
No→Look in Enclosing scope
Found?
No→Look in Global scope
Use Local value
Found?
No→Look in Built-in scope
Use Enclosing
Use Built-in value
Variable not found: Error
When Python looks for a name, it checks local, then enclosing, then global, and finally built-in scope.