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.
wut did I just read
very cool
beauty indeed
Way late here, but for anyone else reading this: An <odd> % 2 == 1, and an <even> % 2 == 0, both of which can be interpreted as the boolean True (1) and False (0) in Python, respectively. So line 3 is essentially saying odd = True, even = False.
This comment is hidden because it contains spoiler information about the solution
When a string is passed to a boolean evaluation, the empty string '' returns False. Any non-empty string returns True. So "not string" is True if the string is non-empty, False if empty.
What "return not string" mean?
Yeah, this thing is like o(n^2), how does this thing have any best practice votes for it?
time complexity is just awful... ;o
This is a really slick solution. Not only is it readable (for me anyways) its also very short. 10/10
Really very elegant solution.
hehe thats funny, not the best in terms of complexity i think, but still clever:)
Ah yes, I see it now. Very elegant method.
I need to remove all non-parentheses characters for this:
string.replace("()", "")
Oh right, the return not string line only works if the string contained only parens at the start. Nice!
Loading more items...