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.
@farhanaditya, doesn't Python match already checks from the beginning of the string? Then why would it match forbidden characters?
The ? after the * is to use lazy instead of greedy quantification, it just makes the process slightly faster (since it returns after the first match) but either one should work.
isn't this wrong? if the condition returns true 'Escaped!' should be in index 1.
thanks for putting comments in the solution!
Not only you lol
Yes, it's necessary. Otherwise you'd match forbidden characters at the start of the string.
You could also delete the min element if this leads to the requirement
√y ≤ x
earlier. See also DarkD1's commentNice! I should forget about regex for a while! Everytime I see katas with strings involved, I try to come up with a solution based on regex.
The question is, if you can compose a word out of
letters
. You can access the preloaded arraywords
the same way as any variable in your code, try to print it on your screen.Note to myself: loop back and forth.
This comment is hidden because it contains spoiler information about the solution
Nice solution, I was searching for a pattern which matches both, the starting letter and the letter after the '.'.
Thanks for the link to B4B's fork, it makes the code even more clean.
Mad World!
Your name in combination with the function name is somehow funny.
I think your points are valid. In order to solve the kata, you can ignore this subtleties as you mentioned.
Loading more items...