From Python in a Nutshell:
Eschew global
Never use global if the function body just uses a global variable (including mutating the object bound to that variable, when the object is mutable).
Use a global statement only if the function body rebinds a global variable (generally by assigning to the variable’s name).
What are the meanings and differences between "uses" and "rebinds" a variable?
Is "mutating the object bound to a variable" "uses" or "rebinds" the variable? Why?