11/12 Syntax Error


n = [3, 5, 7]

Add your function here

def list_extender(1st):
return 1st

print list_extender(n)

SyntaxError: Invalid Syntax on line three under 1. Is there something I didn't do? :anguished:


Hi @russharold,

I cannot seem to find it right now but I will continue to look around and try to find the Python Documentation that states it explicitly but I believe it is a syntax error to use a number as the first character in a variable name.

The instructions are about creating a variable called lst which is lowercase LST and you are probably not the first one to mistake a lowercase L for a 1...

Simply replace the 1 for an lowercase l and your code will work... :smile:

This PEP0008 document recommends:

Function names should be lowercase, with words separated by underscores as necessary to improve readability


Exactly as you stated, denisaltroy. And thanks for the Python documentation, I'm saving that. About 50% done with this course, so you'll probably be hearing from me in the next few weeks! Thanks, Russell :raised_hand: