Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Hi MMMAAANNN thanks...:-)
Thank you, this was very helpful and it was indeed the case that I was printing as opposed to returning the expected value.
I feel you may have misunderstood how things work here.
In CodeWars, what your function prints out never matters. You have to return the required value, not print it out.
In Python, if your function does not return anything explicitly, it returns
None
.Hope this helps.
I solved this using a loop which automatically prints each value to it's own line and I'm getting an error when running tests:
None should equal '1\n333'
I tried appending the items to a list then using the join function with a newline and I'm still getting the same error even though the desired output looks correct.