list_extender, has a parameter,
lst. When the function is called, as in the following statement, it extends and returns whatever list is passed to it as an argument ...
When the above call is made, a reference to the list,
n, is passed to the function parameter,
lst, and the statements within the function are able to operate on that list by referring to it as
Because the function is written to work with its parameter,
lst, instead of only with the global list,
n, you can use it to extend multiple lists, as follows ...
x = [3, 6]
y = [7, 8]
z = [11, 10]
In each case, the argument used in the function call is assigned to the function parameter,
lst, enabling the function to work on that list.