Printing out a list item by item in a function


Oops, try again.
Did you create a function called print_list?

n = [3, 5, 7]

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

I don't get why the code cannot see the print_list function


i think the error message in the output window will be of more use. After a for loop, more indention is required


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