Q
Which keyword lets a Python function assign a new value to a module-level variable?
-
A
nonlocal
-
B
static
-
C
global
-
D
extern
Correct Answer:
C. global
Explanation:
nonlocal refers to the nearest enclosing function scope, not the module. Python has no static or extern keywords.