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.
I just retried your current solution, and I will try to illustrate what I mean - you are 99.999% close to passing!
I copied below the first result I found of some random attempts:
do you see the tiny small difference above in the 2 strings, where yours is currently different from the correct solution? You just need to modify your final returned string to deal with that tiny small difference.
As I said above, from kata Description: "Extra spaces before or after the code have no meaning and should be ignored."
I'm still stuck brother. could you please help to get pass this?
the output I'm getting and the result are same but it still failed to complete the attempts.
Your solution is basically correct - you are missing the implementation of this part of the description:
Extra spaces before or after the code have no meaning and should be ignored.
I have tested your code in the attempt - the way I was able to troubleshoot is by noticing that your results are basically correct except ' ' spaces near end of your returned final results.
As for "how you can solve this" yourself - in future, if you want to debug yourself, pay attention to such error messages in console - or, you can add
print()
statements in your code to see what it is outputting at various steps of the program. This will allow you to notice that (as in this case) you are 99% correct, just missing some small detail.All the tests are passed but, when i was attemoting it was showing the failures.
How can solve this?