avatar Newbie Bite 40. Scope

In this Bite, you'll learn about variable scope in Python. Understanding variable scope is essential for understanding which objects you have access to and when. Often when you think you have created an object, but you get a NameError saying that it doesn't exist, the problem is the scope. Scope can be a difficult concept to wrap your head around, so don't worry if it doesn't make sense at first. If you have the time, I recommend reading the first two articles on Monty and The White Room by Stephen Gruppetta.

Login and get coding
go back
Focus on this Bite hiding sidebars, turn on Focus Mode.

Ask for Help