What does the global statement affect in Python?
Correct answer
D. The scope of the named variable inside a function
6 views
D. The scope of the named variable inside a function
6 views
global x lets the function rebind the module-level x.
Asked in: Python Interview Basics
https://docs.python.org/3/tutorial/introduction.htmlNot sure why the answer is D? Ask here and get an explanation.