Public Variable || Matlab Set || Function || Global Variable || Python
In this we are going to see a basic program of global variables in function in Python Programming Language.



def f():
    global s
    s = "I love HelpForCoders"
    print("Inside Function", s)


f()
print("Outside Function", s)

# Coded By DHIRAJ SHELKE


#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post