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
It's called list comprehension. It could be done in separate lines but this works too :)
While the code is short, it runs through the entire list twice! :Urgh:
It is neither clever nor a best practice.
This comment is hidden because it contains spoiler information about the solution
The head and tail concept is neat.
This is a funny kata. Tests whether one could read instructions and follow.
Why use the square brackets inside the join brackets? They appear redundant to me.
Comparing volume with 'm' twice per loop appears innefficient to me.
I don't think putting conditional statements in a single line is best practice.
Thanks, I have. Replaced list with dictionary for a slightly better code.
After you submitted your own solution, you can see anybody else's solutions.
This comment is hidden because it contains spoiler information about the solution
The idea of converting the list to one of True, False is clever. Mine worked, but it was ugly compared to this!
Cheating is NOT best practice!
I was in the same boat. After viewing enough of them here, I finally managed to use a list comprehension properly, and get a solution that is comparable to, if not better than, the obove. :)