globvar = 0

def set_globvar_to_one():
    global globvar
globvar = 1

def print_globvar():
    print(globvar)
set_globvar_to_one()
print_globvar()
Using global variables in a function other than the one that created them