12. Printing out a list item by item in a function



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

My code:
n = [3, 5, 7]

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

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

It’s probably easy but I don’t get it… Where is that “n” in my function?


you where given this code:

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

as scaffold so you could use it in your function, you wrote new code, which is fine, but then you need to remove the scaffold code


Yes, that was the problem - thank you much!!!