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.
I don't understand, why everyone are doing 3 ifs, while you only need 2?
solved the same)
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
Cheating or not, it helps increase everyone else's knowledge :P
just... you know. joking :D
It's knowledge and effective usage of the included batteries. :)
That is cheating! :)