In this program, you will learn how to use a global variable with a function in Python.
num = 10
def change():
global num
num = 10
def change():
global num
num = num + 10
print("Value is:", num)
change()
Value is: 20