Question about 11/18


I solved the exercise I just have a doubt
why do we return lst and not list_extender
here’s the code :
n = [3, 5, 7]

Add your function here

def list_extender(lst):
return lst

print list_extender(n)


lst is the list we modify, we want to return the modified list. list_extender is just the function, why would the function return itself?


A post was split to a new topic: Question about print


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.