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.
just the zen of python ;)
but the point I was focusing is the build-in filter
Enveloping a function into a class for no particular reason sure makes a lot of sense ;)
none of you read the title!
where is that filter???
checkout my solution!
If you split for example "a__b" (double space instead of underscores) into a list, it will result in ["a", "", "b"].
When you join it later, there will be one space between "a" and the empty string "" - and another space between the empty string and "b". Therefore you end up keeping the double space like in the original string.
This comment is hidden because it contains spoiler information about the solution
this solution does also use a foor-loop
A constraint that the strings wouldn't contain triple-spaces or even larger, was not stated so this solution also works well for those cases (I just tested) - well done.
I managed to solve after like an hour by adding space as a seperator but I don't know why it actually works this way
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Bro just needed to shorten the variable name just like the natural instinct of any programmer, also I don't know why I got sent a kyu 8 that took me seconds.
This is the first question after 50+ challenges where I got the exact same solution as the top one.I would always get like the 3rd,4th best practice.
Just keep doing these and look at other people's solutions and try figure out their thought process.
Nice, I didn't even think just to return int(s). I could have saved one step.
Great work!
How did you account for the double spaced in your code?
same as mine!
Loading more items...