Printing out a list item by item in a function


WHat am i supposed to be doing here?

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


Hi @captainmowdy,

This line needs to be indented further, so that it is part of the for loop ...

    print x[i]

Then you need to call the print_list function, passing n to it, as follows ...



2 posts were split to a new topic: Modifying each element in a list in a function