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.
Python
There is indeed an issue in the reference solution
Not possible to create these palindrome length since they are longer than the original string.
ok
This comment is hidden because it contains spoiler information about the solution
Edit: The other user edited their comment ~10 times after I replied, the original text was:
Those aren't the names of fruit, so the question is malformed. There are plenty of real-life scenarios where we know a lot about our data and do not need to exhaustively validate it.
From the Codewars Kata Authoring Guidelines:
If I were being pedantic I would point out that neither of your adversarial examples are actual failure cases, even with the additional requirements you assume - both are out of specification, with the first in the wrong casing and the second misspelled. I don't disagree that there's some ambiguity here but I do not think adding boring additional validation requirements is the way forward - the spirit of the kata can be maintained with a slightly more robust description.
The need for input validation and edge-case handling is domain-specific; it's common when dealing with strings especially, but it is not universal. If our domain knowledge allows us to assume things such as "all fresh fruit names are singular lower-case words which do not contain 'rotten'" and "all rotten fruit names are the word 'rotten' followed by a fresh fruit name, in camelCase" then we do not need to handle the edge cases you suggest. The description could perhaps be more clear, but it does seem to allow that assumption.
Adding random input validation requirements is not recommended on CodeWars, so I don't think this is a good suggestion.