What is wrong about this?


#1

n = [3, 5, 7]
def print_list(x):
    for item in x:
        print item

for i in range(0, len(n)):
    print n[i]
    
print_list(n)

Oops, try again. The body of your function should not contain any references to 'n'

it doesnt!


#2

It's reacting to the loop outside your function, remove that.

The exercise might also want you to use a range-based loop by the looks of the loop outside your function. I don't know how the exercise is worded or if it'll give you trouble for it, just making an observation.