12. Printing out a list item in a function


Can someone please show me where I'm going wrong in this exercise?


I get this error message after running: Oops, try again. The body of your function should not contain any references to 'n'

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



The for range - look at the argument you used in function print_list.
Also the print i, you are missing the argument and [ ].

Even the error indicates your function should not contain any references to 'n'. We want to print an item in a function.

Hope that helps. Let me know.


@carl1n I found my error. Thanks for your help!


That is good news.

Remember for any topic you create -


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