Why my code in this Python exercise generates a "None" line?

Hi, I am doing this exercise in Python and I think my code is fine altough it is different from the solution proposed by the system. The only problem is that it generates a None line and I do not know why, could anybody help me? Thanks!
image
The solucion proposed is:
def every_three_nums(start):
return list(range(start, 101, 3))
This option doesn’t return the None line.

I believe the reason is that the function isn’t returning anything, so it’s returning “None” once the loop finishes. The proposed solution is using a return statement, so there is no “none” printed because something is being returned.
https://www.codecademy.com/resources/docs/python/functions

I think you are right! Thanks for your help Mondvay! :blush:

1 Like

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