12. Printing out a list item in a function


#1



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

https://www.codecademy.com/courses/python-beginner-nzzVa/3/1?curriculum_id=4f89dab3d788890003000096#


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


#2

Hello

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.


#3

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


#4

That is good news.

Remember for any topic you create -


#5

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