Skip to main content
Part 3 of 7 · Chapter 4 of 4

Where a Name Actually Lives

A variable created inside a function looks like it should be visible everywhere once the function has run. Try to read it from outside, and find out Python disagrees, on purpose.

Intermediate10 min read

Read first: Naming a Piece of Work


Make a free account to read on

Every chapter is free — an account is how your progress, XP, and streak follow you from your laptop to your phone, and how you show up on the leaderboard. No payment, no trial.