ReferenceKeywords
global
Lets a function rebind a module-level name rather than making a local one.
Signature
global nameReturns
Nothing.
Example
Python
count = 0
def bump():
global count
count += 1
bump()
bump()
print(count)Output
2