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.
And in fact, it would have thrown an error with an even length too, since range needs integers (3.0 won't do).
just look at other solutions using one additionnal line before the comprehension.
What's the O(n^2) solution ?
Nice...
Test Cases could have been more perfomance demanding
Worst practice ever, on this kata... This is O(n^3). And this is certainly not clever either for the same reason.
People should learn a bit, before upvoting this sort of code...
My bad >< Should study Python2 more.
In Python 2, both / and // perform floor division by default, so there is no error.
If len(word) is odd, range function will return error. You should use range(len(word)//2).
This comment is hidden because it contains spoiler information about the solution