Using an element from a list in a function; What's wrong?


#1


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

TypeError: 'function' object has no attribute 'getitem'


Replace this line with your code. Do not remove the backticks that are above or below this line.

def list_function(x):
    return list_function[0]

n = [3, 5, 7]
print list_function(n)


#2

You are trying to return value from the function name instead of from passed list.

BTW, you supposed to return value from index one.


#3

Ah, silly me >.< should return x[1]. Thank you!