How would you define a function that takes an optional argument and appends to it without having to provide the argument? The code is something like
def myfunc(value, values=[]):
values.append(value)
return values
print(myfunc("item"))
print(myfunc("item"))
expected output would be
['item']
['item']
instead of
['item']
['item', 'item']