I know what are you thinking. You think that You have to loop over
n list so you will use
len(n) inside the function..
suppose I made a function..
print (2 * x)
You can see what this function does,It can take any number as argument and print double of it..
like if these are our variable..
a = 3
b = 4
c = 5
and we pass them one by one to our function.
Double(a) #prints 6
Double(b) #prints 8
Double(c) #prints 10
Our `x' variable is just act as placeholder/a variable inside the function ,When we pass our value to function ,then all x is replaced by this value and function does operation i.e. it has to do on value(here function just doubles it)
same way when we create this function(in your post),
we create a general function that can take any list as argument/value and prints its items.
(I will delete this code soon)
so when you pass any list of any length,it handles it!