Question: what is local variable and global variable in python?
Answer: A global variable can be reached anywhere in the code, a local only in the scope. A global variable (x) can be reached and modified anywhere in the code, local variable (z) exists only in block 3.