So this is my current code:
n = [3, 5, 7] def print_list(x): for i in range(0, len(x)): print(x[i]) print(print_list(n))
I get the result:
This result was approved, however I don’t understand why there is a “None” printed out at the end.
I tried changing my code to
for i in range(0, len(x)-1)
However, I got this as a result:
I’m assuming this has something to do with how the range function works (which I haven’t gotten to yet).
UPDATE: So I learned what range does, but it still does not explain why the “None” appears at the end. Can anyone explain why this happens?