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.
The definition of the "parts" help to make the code readable and more simple to maintain (for bug or changes).
In the real world this is better than the 1-3 lines solutions.
Indeed, you're absolutely right! Nice notice, thank you.
Basing on the documentation (https://docs.python.org/3.5/library/stdtypes.html#str) str() is safe if no value is provided (it returns an empty string) and for other objects.
Why are you checking the ValueError and TypeError?
I tried to maintain code as readable as possible, especially the "robot search" Regex part. I porpusely avoided to use a single "crazy" string.
What if tomorrow the "eye" can be a "X" as well as the current "0"?
What if this happen after 1 year and the poor developer that maintain the code has to understand all the regex?
I used ony compiled regular exceptions and avoided to "play with strings".
Are you removing lowercase and UPPERCASE vowels?
"Expected" and "But was" are inverted becauset he test cases are using Assert.Equal() in a wrong way.
The expected value should be the first parameter, the returned value the second one.
Example:
Assert.AreEqual("Ths wbst s fr lsrs LL!", Kata.Disemvowel("This website is for losers LOL!");
If you use Assert.Equal() in this way you have the right "description" of the failure.