Program - Usage of global keyword


Topic: Program - Usage of global keyword

Solution

x = 0
def in_func2():
    global x
    x = 1
    print('in_func2:', x)
in_func2()
print('global:', x)



List all Python Programs