I've step across this behavior in python:
def a(fruit,fruit_list=['banana','apple','orange']):
fruit_list.append(fruit)
print(fruit_list)
a('cherry')
a('kiwi')
Output:
['banana', 'apple', 'orange', 'cherry']
['banana', 'apple', 'orange', 'cherry', 'kiwi']
I was wondering, are python parameters in functions saved in the stack as global parameters?