I'm fulfilling an API for a function that needs to take in a list, make a copy of it with some modifications and then set the out parameter as the copy. i.e. the function returns nothing, but must change the list object that was passed in as an argument.
Something like this:
l = [1,2,3]
def f(passed_in_list):
different_list = [4,5,6]
passed_in_list = different_list[:]
print(l) # Prints [1,2,3]. How to make it [4,5,6] ?
How can I achieve this?