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.
solved the same)
Using the #sum method from Array is many, many times faster than using the alternative, inject or reduce.
i like this one, clean with easy methods
Even though there is some redundancy here, is this solution a better example of Python's "explicit over implicit", "Sparse is better than dense", and "Readability counts". I am not a regular Python coder, and I find this solution to be more readable at a glance than the one-liner. Is the one-liner more idiomatic and therefore more readable once you become more familar with Python?
Think about what you are asking the code. You are asking the computer to evaluate if the above statment is true (boolean analysis). You are then asking it to return true if it is true, false if it is false. This is redundant. Better to just ask it to return to result of boolean evaluation, as the dffuller is saying. The result of teh conditional operation "if" is the boolean result.
the code form
is an antipattern. instead use
what