The star '*' operator is used to unpack arguments from a list. It is similar to the varargs in C/C++ or Java when a function expects a random number of arguments. You cannot change the original list / array in this case.
However, if you need to pass an array on that you will change inside the function, and then returned it back, I recommend you to pass and array or list to the function without the unpacking operator *. Example:
def try_to_change_list_contents(the_list):
print('got', the_list)
the_list.append('four')
print('changed to', the_list)
outer_list = ['one', 'two', 'three']
print('before, outer_list =', outer_list)
try_to_change_list_contents(outer_list)
print('after, outer_list =', outer_list)
You can take a look at this post too:
topic