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


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]


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



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