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 get rid of the "read data from an I/O stream" nonsense, the task comes down to checking whether a substring exists in a string (+ trivial map/filter/reduce) which is neither novel nor interesting kata idea.
Hi,
The test framework isn't used properly. See https://docs.codewars.com/languages/python/authoring/
Cheers
pattern
in random tests sometimes contain\n
.grep
without flag uses "basic regular expression" as default, not plain text as explained by the description. The test is set up such that metacharacters used by basic regular expression are excluded from the input so it behaves like plain text, but this is giving the wrong idea about how grep works, which is not what a kata should be teaching to people.Please use the standard method for kata testing (aka unit tests) to run user code instead of using I/O. There are no reasons I/O has to be involved in this kata at all, nor is the introduction of
StringIO
into the user function meaningful (matches
should not be responsible for reading from IO and performing the logic at the same time. This is called coupling and is not good programming design.)Using
Q
rather than:
to enter ex mode should work as well, IMO