Misunderstanding scope can cause problems in your application. Watch this lesson to learn how Python scope works and the hidden implications it presents. Local scope, nonlocal scope, and global scope variables are demonstrated and explained.
In the first global variable example in the transcript the wrong function is used, I.e.
If you're new to scopes and would like to visualise them, try running the code in this lesson on this website: http://www.pythontutor.com. This helps visualise each frame aka scope existing in a program i.e. global, functionA, functionB, etc.