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.
Why do you say that?
This comment is hidden because it contains spoiler information about the solution
You can avoid this now with the walrus operator
Looks good to me. However, I tried to approve and got
Failed to approve: translation must be pending over a week or the kata author must be inactive for the past month
While we're changing things, how about the parameter names?
list_of_art
is especially mysterious, with nothing in the problem that seems to fit the "art" abbreviationSometimes the best problems are slightly annoying, in a way that requires you to think about them. This is a good example of that.
and I saw it this morning in just one of my attempts
4 years later still there rip
I was thrown off when using
words
as a name and accidentally shadowing the global. Not a huge deal, but I would prefer the global to be all caps, or passed in explicitly.I see there are some sadists on the CW?)
Actually, I prefer for people to think they have a good solution after passing the sample tests only be to shocked that their solution is not complete at all. IMO it gives a good lesson to take more care to read the kata requirements carefully and not be too hasty in thinking you are finished without considering edge cases.
reduce with lambda: ehh.
reduce without lambda: beautiful.
Sample tests (in Python) are too easy, delaying all the good stuff for the real tests. We could use one that sets the same attribute twice, for example.
Good kata for trying again in different ways, with different approaches
I think most people will assume that the operations "consume" their inputs, and they would be right. But yeah, the description should state it anyway, just to be clear.
Loading more items...