Python · Lesson 7.4 · Pro

Scope

Which names a function can see, and why passing values in beats changing globals.

In this lesson

  1. Names inside stay inside
  2. Reading outside names
  3. Assigning makes a new local
  4. Changing a list you were given