Why does it say n should not be used in the body of my function when it isn’t?
This seems to be an error present in this exercise at the time of writing. If you leave the initial
for loop code as it is and write your
print_list function after it, it marks your code incorrect even if it is the right solution.
To work around this, delete the initial
for loop and the
If that doesn’t work, check to make sure you are iterating using
x as your list you’re checking and
print_list(n) at the end, outside of any functions (unindented).