Printing out a list item by item in a function


The body of your function should not contain any references to 'n'.

In the hint tab it says to add lines 3 and 4 from the editor to within the function and to indent properly but it seems there is some problem.

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



The solution to this problem is if haven't used the snippet of code in lines 3 and 4 and if you wrote your own copy of it erase lines 3 and 4. Or you can just define your function on line 2 and continue with rest.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.