Python Tutorial: Variable Scope - Understanding the LEGB rule and global/nonlocal statements

In this Python Tutorial, we will be going over variable scope in Python. Scope is important because we need to understand it in just about every program we write. It allows us to understand where our variables can be seen from within our program and also what values these variables hold. It also...

Intermediate - 21 min - Software & IT - Corey Schafer

The full course: Learn Python free

What you'll need

Books

  1. Python Crash Course by Eric Matthes - View on Amazon
  2. Automate the Boring Stuff with Python by Al Sweigart - View on Amazon
  3. Head First Python by Paul Barry - View on Amazon
  4. Fluent Python by Luciano Ramalho - View on Amazon
  5. Learning Python by Mark Lutz - View on Amazon
  6. Python For Data Analysis by Wes McKinney - View on Amazon

Next lessons