List and Functions error


#1



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


Receiving the error: Oops, try again. list_extender([1, 2, 3, 4]) returned [3, 5, 7, 9] instead of [1, 2, 3, 4, 9]


n = [3, 5, 7]
# Add your function here
def list_extender(lst):
    lst = n.append(9)
    return n
    
    print list_extender(lst)


#2

The n inside the function list_extender has no meaning. The placeholder you used was lst, not n.


#3

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