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.
There's a builtin function to do that work, also return and not print. Read this for more info
You're using global vars, they keep their value between tests, are you using those two prints exactly as I posted them? Calling only one at a time will work fine, but calling them one after the other won't.
Read this: https://docs.codewars.com/training/troubleshooting#works-but-no a problem with your code is not a kata issue.
Call your functions in your IDE, like they're called here in the tests, one after the other:
OP solved it, not an issue
I feel the same. I like machine learning, but I don't like trying to figure out what author mean by looking at tests. Sometimes it's just 100% waste of time, since even tests not always don't correspond to the intention of author and looking at the comments in this disscusion it's one of those katas.
So this sounds like we need to create a kata for ourselves... metakata...
This comment is hidden because it contains spoiler information about the solution
You should divide your string into 5 partitions but they do not have to be equal in length (especially the case for the last partition). Given the string: "ABCDEFGHI" (of length 9) your partitions would be: ["AB","CD","EF","GH","I"] Hope this helps
'Looks like you've solved it'
Read the error message, it tells you exactly with which input your code is failing and it's not possible your code works with that input.
Maybe because you reverse all one word strings no matter the length? Read this
return the value, not print
Did you read the errors? To begin with, return the result, not print it.