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.
Yes. I guess the fact that there are at least 3 possible reasons is enough to have more "clever" than "best practice" :-)
BTW, I was wondering why this solution is rated more "clever" than "best practice".
It's because of the use of import, or because it's "one-liner" or because it uses a "regex"?
This comment is hidden because it contains spoiler information about the solution
I really like this solution with no imported module.
Just I think it would have been easier for me to undestand with a different choice of variable names ("lines" instead of "parts" and maybe also "line" instead of "v" and "m" instead of "s").
I came up with a similar solution. I used a dictionary to store peaks and pos so we don't need a second loop.
This comment is hidden because it contains spoiler information about the solution
Kata says function "takes a list of non-negative integers and strings"
This comment is hidden because it contains spoiler information about the solution