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.
Map Max: Fury Road
This is a good one for testing performance but not too harshly
oops, i left the import in there
This could be an interesting pattern-matching problem, but right now it's just a trick about whether you read the order of two very similar words
I also saw the
don't import ast or a module that depends on it
message when I hadn't imported anything. In fact, you can reproduce this in one line by writingreturn x
and getting a NameError because there is no x. So there must be something that wrongly triggers that message with Python NameErrors, at least.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.
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.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
Loading more items...