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.
This means you'll eliminate double spaces.
This comment is hidden because it contains spoiler information about the solution
it's not list comprehension but 'generator expression' https://peps.python.org/pep-0289/
My first solution on codewars is the best-practice-solution, yoo-hoo!
No, this is very easy to read, and the pythonic way to do things in general.
Aaaah, I almost got it this way.
Is this a good practice in a project?
Doesn't it difficult to read?
I can finally comment and upvote. What's up with that codewars admin? so far only 8kyu enabled me to do so. Shame!
my brain doesn't work this way :(
Lovely. Simple and clever.
Hard to say, since that scenario isn't covered in the requirements or the test cases. I'm honestly not sure what the original writer of the kata would consider the "correct" solution for something like "UK".
Beware that this fails for "UK" for instance.
Hard disagree that your technique adds clarity.
People familiar with python are plenty used to generators, and your elimination of the generator actually confuses things. And people not used to generators really need to get used to them if they're going to be doing much programming in python.
Your solution is also really inefficient, since it's calculating
c
on every tick of the loop.i solved it with the same instructions but with more lines for clarity purposes to make it easier for the readers xD
I solved it exact same way. and it's best solution.
This comment is hidden because it contains spoiler information about the solution
Loading more items...