Variables declared outside a function or in global space are called global variables. These variables can be accessed by any function in the python program.
def demo(): print(a) a = "Python" demo()
x= 5 y = 20 def multiply(): z = x * y print(z) multiply()
This is all about global variables in python.