I want to change a variable in function through its helper function. I tried the following:
def f():
    e = 70
    print(e) # prints 70
    def helper(e):
        print(e) # prints 70
        e = 100
        print(e) # prints 100
    helper(e) #function called to change e
    print(e)  # Still prints 70 :( Why?
f() #prints 70, 70, 100, 70
Why does it not change the value of e (I passed it as parameter and python doesn't copy values too, so value of e in f should be changed)? Also how can I get the required result?
 
    