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.
\d means any digit from 0 to 9
This comment is hidden because it contains spoiler information about the solution
You may have sussed it out by now, but some of the random test strings actually have double whitespace, and some of the test case outputs don't represent the double whitespace difference clearly due to word wrap.
This comment is hidden because it contains spoiler information about the solution
Well... I implemented decryption with a call to the encrypt but calculating
n
accordingly so that both functions become inverse of one another.Python allows to create boolean expressions and to return them.
In Python you can nearly return all the objects you want: even functions are objects.
This is part of basic features of the language and any complete tutorial should bring you this knowledge.
So good luck in your learning journey ;-)