Python Arena

Module 26

Local and global variables

Where a variable can be used. Local variables that live inside a function, global variables and the global keyword (and why to use it sparingly), and passing data between functions with parameters and return values instead.

Steps

  1. Local variables
  2. The global keyword
  3. Passing data between functions