i start with Python. I like to try new language. So i've got a "simple" problem about scope and Python.
Here is a recursive function
def foo(myarray)
if myarray == False:
myarray = [[0] * 5 for _ in range(5)]
myarray[0][0] = 1
"some code ..."
foo(myarray)
myarray = False
foo(myarray)
I don't want to share my var "myarray" in global env. I juste want Python scope "myarray" only in the function not outside. But Python shared "myarray" as it were a global var. How can restrict the scope to the function ?