I am wanting to understand how Python maintains its reference to the array value between the first call and second call to the function. Is there a symbolic table that can be queried or looked at to see what the object values are between the first and second call.
def scopeUnderstanding2(a, myArray=[]):
print(f"myArray in func scopeUnderstanding2 myArray : {myArray}")
myArray.append(a)
print(f"myArray in func after .append(a) myArray : {myArray}")
print (scopeUnderstanding2(1))
print (scopeUnderstanding2(2))
myArray in func scopeUnderstanding2 myArray : []
myArray in func after .append(a) myArray : [1]
None
myArray in func scopeUnderstanding2 myArray : [1]
myArray in func after .append(a) myArray : [1, 2]
None