Why not simply return your calculated value and let the caller modify the global variable. It's not a good idea to manipulate a global variable within a function, as below:
Var1 = 1
Var2 = 0
def function():
if Var2 == 0 and Var1 > 0:
print("Result One")
elif Var2 == 1 and Var1 > 0:
print("Result Two")
elif Var1 < 1:
print("Result Three")
return Var1 - 1
Var1 = function()
or even make local copies of the global variables and work with them and return the results which the caller can then assign appropriately
def function():
v1, v2 = Var1, Var2
# calculate using the local variables v1 & v2
return v1 - 1
Var1 = function()