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.
Imports for solution and codewars_test are missing.
Tests should use python test framework: https://docs.codewars.com/languages/python/codewars-test
missing import, missing test.it blocks
Lack of novelty
Neat kata! I rarely explore unusual use cases for decorators, so I'm always happy to see something new.
It's start:stop:step
Here it means start at the 2nd element (index 1 in base 0) then take every other element (step of 2).
stop is empty so default is until the end of the string.
could you please explain the slicing method st[1::2] ?
Thanks
Just select
Python 3.8
at the top page.Am unable to run tests. Even after resetting, I get this error:
Yeah, to be clear I did submit a proper solution before this one (just realized whilst I can still see it I'm sure if others can?)
As ideally invalid solutions would be caught by tests (but that is hard to do) I find it an interesting challenge to try and sidestep them once I've completed the challenge properly.
"you are not allowed to use the lru_cache decorator from the functools module for this task."
Working on this Kata makes decorators more accessible.
Very recommended.
This comment is hidden because it contains spoiler information about the solution
Great kata! Now I have much better understanding of decorators :)
really nice kata. helps a lot if you want to see if you understand decorators in python.
that's what i like about codewars. it has some exercises that could be useful in a real application and not just acedemic purpose.
This comment is hidden because it contains spoiler information about the solution
I think the description should be clearer, I'm not sure if I enter n and use the first function, whether the first n numbers should be returned, or all but the last items with value of n should be returned.
Apparently, you should reload this kata, so there isn't so much information - I've changed it.
Loading more items...