12/11 List manipulation in functions



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

It seems that using 1st as a parameter is causing a syntax error. If I replace (1st) with something else like (hi) it works just fine.

n = [3, 5, 7]
# Add your function here

def list_extender(1st):
    return 1st

print list_extender(n)


I made the same mistake. It's lst, not 1st. As in the letter 'L' (lower cap though).


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