I tried the above code i got error Oops, try again. Make sure to print the second element of the list using bracket notation


#1

Continuing the discussion from 12. Printing out a list item by item in a function:



Replace this line with your code.


#2

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

#3

your code is fine, try to refresh the page/different browser

Does the output look right?


#4

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