def myFunc():
d={}
myFunc()
If I try to access the variable d after calling this function, I get "NameError: name 'd' is not defined."
Why is this and what is the proper way to access a variable defined within a function?
def myFunc():
d={}
myFunc()
If I try to access the variable d after calling this function, I get "NameError: name 'd' is not defined."
Why is this and what is the proper way to access a variable defined within a function?