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


#1

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

"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?


#2

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


#3

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


#4