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.
Thank you bro this helped a lot.
Strings are anything in between quotation marks, not just letters.
All of the examples are strings: "Hello" ------ '909+78' ------- "??@.:;^+"
this one was actually possible but i know what you mean...
I started learning Python with YT tutorials and codewars, and this kind of problem would have stomped and disheartened me at the beginning.
To me 8 kyu is literally just citing a concept or function (e.g., this one: https://www.codewars.com/kata/555a67db74814aa4ee0001b5/python),
while 7 kyu is applying a concept or function, and 6 kyu combining more than one concept or function, and so on.
Especially 8 kyu shouldn't be too hard because if the entry level is steep a lot of the true beginners will turn away.
Well, my opinion, at least :D
This comment is hidden because it contains spoiler information about the solution
I thought about this, but then I decided to learn :D
I think it's clever so I vote clever :D
Since I don't really have a proper reference for what 'best practice' would look like.
Clever means for me that it is an approach I couldn't even conceive of,
or that combines aspects of programming in a way that is new to me.
Some importable libraries are so useful but almost feel like cheating in codewars.
Knowledge is power :)
d | other
(cf. https://docs.python.org/3/library/stdtypes.html#mapping-types-dict)
This comment is hidden because it contains spoiler information about the solution
The answer is to divide by 2, if the remainder is 1, then it is odd, and if the remainder is 0, it is even
Yep. This approach in JS or PHP is much shorter. I simply translated my solution from it into Python, which works awkward with regular expression. And I believe there was a bug with random tests 4+ years ago that involved removing multiple spaces that made the code even longer =)
Readability >9000 :D
"7 kyu"
I think it's clever because I was really trying to figure out a way to solve it without relying on lambda
but couldn't quite figure it out because if two items have the same key, their original order will be preserved. However, by reversing the words, I inadvertently changed the order for words with the same last character. Surely this example here is not best practice but a unique approach I appreciate.
Complexity here I think is:
O(n×m), where n is the length of the alphabet and m is the number of words in listx
Loading more items...