12. Printing out a list item by item in a function, please help


#1

I don't know what is wrong with this code

n = [3, 5, 7]
def print_list(x):
    for i in range(0, len(n)):
        print x[i]
print_list(n)

#2

you should get the length of the lists passes into the function (len(x)), not the length of your list you defined on line 1


#3

@phrygianballad

in line 3 of your code replace n with x.
it will work..