I really need help with this exercise. The instructions are:
- Define a function called print_list that has one argument called x.
- Inside that function, print out each element one by one. Use the existing code as a scaffold.
- Then call your function with the argument n.
The hint: You can simply place the code on lines 3 - 4 inside a function definition. Make sure to indent properly! And you'll have to change the n to x
x= [3, 5, 7]
for i in range(0, len(x)):
I get the error: File "python", line 4
for i in range(0, len(n)):
IndentationError: expected an indented block
What should I do? I've looked at the codes that other people have uploaded here and they don't work for me as well.