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.
This comment is hidden because it contains spoiler information about the solution
This is so cool!
it's not only messy, it's overall bad practice and straight up doesn't work in some languages.
Still strange. I copy-paste the code and it gave error.
oh my
I can! :) This is not tested, which is not my problem.
Instructions: "You can not use multiplier "*" operator."
I think this kata has been reviewed and its issues with Python addressed, because I found none of the problems that past users encountered. Thanks for the improvements!
Inside the lambda expression, on the right between parentheses (), it defines a tuple containing the original string s in the position 0. In position 1, it removes the last letter form the original string using the index s[]. On the left between brackets [] goes an expression that will act as the index of the tuple. If the original string does not end with an exclamation, the expresion s.endswith('!') will return a 0, selecting the value at position 0 of the tuple, so the lambda returns s. On the other hand, if the original string ends with an exclamation, the expression s.endswith('!') will return a 1, selecting the value at position 1 of the tuple, so the lambda returns s[]. This is basically control flow but using indexes instead of if-else expresions.
O___O
It already has been marked as spoiler.
Oh, sorry! I thought these comments were only visible to users that had completed the kata. I'm trying to flag the spoiler but it says I'm not authorized to do so. I can't find a way to delete the comment either now, maybe due to your reply
Please use the spoiler flag when posting potential spoilers. Your comment is visible to everyone from the dashboard, including users who haven't solved the kata.
This comment is hidden because it contains spoiler information about the solution
It's just a bit of harmless flavour...
Loading more items...