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.
IF you swap the positions of any of the special characters with each other, your solution won't notice -- among other false positive errors.
Of course a regex is not NECESSARY, but it is a very concise and clear way to solve the problem.
Use https://regex101.com/
Can someone tell me what the ^ and $ mean in a regular expression?
Its harder to understand your solution. Is it really better than regex?
This comment is hidden because it contains spoiler information about the solution
Nice. I didn't know that $ meant end.
Oh, ok. Thanks!
x, y = stack.pop, stack.pop
can be simplified tox, y = stack.pop(2)