List manipulation in functions


#1



https://www.codecademy.com/courses/python-beginner-nzzVa/2/4?curriculum_id=4f89dab3d788890003000096


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


Where is the error in my syntax? It looks right to me.


n = [3, 5, 7]
def list_extender(1st)
    1st.append(9)
    return 1st

print list_extender(n)


#2

(added my : and it still returns the same error)
n = [3, 5, 7]
def list_extender(1st):
1st.append(9)
return 1st

print list_extender(n)


#3

NVM...i see what I did. Wow...the "1" and the "l" really do look alike.


#4

Hello,
Your code:

I see mistake, your parameter is: "1st" >> invalid. Replace "1" to "l"

The Rules
Variables names must start with a letter or an underscore, such as:
_underscore
underscore_
The remainder of your variable name may consist of letters, numbers and underscores.
password1
n00b
un_der_scores
Names are case sensitive.
case_sensitive, CASE_SENSITIVE, and Case_Sensitive are each a different variable.

Have fun!


#5

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