Function parameters and arguments


#1

in the solution below, how does function know that i am going to use n list and appended 1st into 9 even if i didn’t mention it

n = [3, 5, 7]

def list_extender(lst):
lst.append(9)
return lst

print list_extender(n)


Which list am I appending to and returning?
#2

because you give n as argument on function call:

print list_extender(n)

so the parameter (lst) then receives the value from argument at function call

so parameters are in essence placeholders until the function is executed/called