Excuse me for being new to python. I feel as if this should be possible, but I have looked all over in this site (among others). I can't seem to directly change a variable in a function with a nested function. I've tried
global
to no avail. I could reassign it to get around this but it causes issues later.
Example:
def Grrr():
a = 10
def nested(c):
b = 5
c -= b
nested(a)
return a
I am trying to stay away from
def Grrr():
a = 10
def nested(c):
b = 5
c -= b
a = nested(a)
return a
If that is truly the best way, then I'll use it I guess. I just figured there were people here far better than I.