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.
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]
    
print_list(n)

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


#2

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


#3

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