python using blogal code example
Example: global in python
x = 5
def foo():
global x = 10
print("local x:", x)
foo()
print("global x:", x)
x = 5
def foo():
global x = 10
print("local x:", x)
foo()
print("global x:", x)