I am confused


#1

Hello. This seems like it should be a simple code but I must be missing something.

1.Define a function called list_extender that has one parameter lst.
2.Inside the function, append the number 9 to lst.
3.Then return the modified list.

      
n = [3, 5, 7]

Add your function here

def list_extender(lst):
list_extender.append(9)
print list_extender


#2

n = [3, 5, 7]

def list_extender(lst):
lst.append(9)
return lst

print list_extender(n)


#3

Thanks. I think I had an indent error. Sometimes resetting the code panel helps.

Todd


#4

You're welcome!

Yes, indents are really important in Python.

have fun!