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.
Thanks for the explanation!
I really like your solution supervik!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
The alternative is equally bad. They both reimplement functionality that Python already provides because the authors do not fully understand how sequence slicing and
str.join
work. Here is a Pythonic solution that is easy to read:https://www.codewars.com/kata/reviews/552fd3dcac4956812b000050/groups/59cbbc0df7ee423018000a42
This will work in the mentionned case since, in Python, "0" != 0.
Note that this solution will transform 0.0s into 0s, but in Python this shouldn't be a problem.
This comment is hidden because it contains spoiler information about the solution
Nice to have an explanation too!
Might be "nicer", but a while loop avoid to hit the reccursion limit, for massive arrays. Beautiful or robust, choose your side ! ;)
This comment is hidden because it contains spoiler information about the solution