# Global scope X = 99 # X and func assigned in module: global def func(Y): # Y and Z assigned in function: locals # Local scope Z = X + Y # X is a global when referenced here return Z func(1) # func in module: result=100