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 comment is hidden because it contains spoiler information about the solution
does this modify the original list l?
Is it any good to name your arguments/variables
str
orint
, which are normally predefined functions?I'd rather maintain something like this than a regex. I mean, python is supposed to be about readibility, no? Thanks for this clean solution anyway.
Yup, these should be grouped together.
Because args passed to the spread is a list.
yonax, you uncovered a nasty bug. I have fixed it and added the test cases discussed above to the kata.
This was due to an issue in my logic for solving the problem. It has been corrected, and the kata has been republished.
To confirm,
Okay. Then why these tests are not in the kata test cases? :)
Just want to show that mine(incorrect) solution successful pass your test suite and offer one possible way to catch it.
easy enough, but then shouldn't i also add:
?
To me knowing that:
should be enough to deduce that None is also a value that counts, and that [None]/[None, None] gets a .5 affinity.
again, it's easy enough to add the test case, but unless that test case addresses a specific flaw in the instructions or problem, i'm hesitant to do so.
This comment is hidden because it contains spoiler information about the solution
Simple, elegant - the entire reason I use codewars is to be enlightened by such answers!
Same solution as the one at the top
Wouldn't
max([s2, s1], key=score)
be cleaner for the last line?Loading more items...