List manipulation in function


n = [3, 5, 7]

Add your function here

def list_extender(1st)
return 1st

print list_extender(n)

i keep on getting

File "python", line 3
def list_extender(1st)
SyntaxError: invalid syntax


Try lst instead of 1st. (That is, lowercase L.)


thnx i got it finally


Why can't we .append 9 to list_extender but instead must .append to (lst)

in other words, I first did this:

list_extender. append(9)

didn't work.

this did:




list_extender is a function, not a variable. You can't add anything to it, because it's a set of instructions. Functions don't hold values.


Okay, thanks james.rhea