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.
Wow, guess I learned something new today! :D
Damn, this has to be best practice - a one-liner, readable and efficient to boot! Learned something new today.
This comment is hidden because it contains spoiler information about the solution
Because if any of us are actually led to believe this is "Best Practice" and decide to use this code in a production environment or for an interview with Google, it would be bad.
One-liners that are absolutely not best practice but are great fun, let's go! :D
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
That's the thing, they aren't. It's a culture thing :D
People just upvote one-liners as best practice for the sole purpose that it compacts more code into a smaller space and is thus seen as minimalist or cool.
Of course, sometimes (such as for list comprehensions or for cases where it's easier to use a built-in function) one-liners are actually best practice, but half the time, it's more likely to be someone using some esoteric, relatively niche and/or inefficient code in a one-liner.
But it's been 11 months so you probably know by now.