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 looks like a perfect problem to use re
I feel like there must be some way to improve this, that's way more nested loops than there should be
good idea to be more defensive even though positive s is already assumed!
To make it shorter and probably easier to maintain, you could extract returningfrom if-else block, so in condition you only set the value and return it in the very end