Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    Hi,

    The test framework isn't used properly. See https://docs.codewars.com/languages/python/authoring/

    Cheers

  • Custom User Avatar

    pattern in random tests sometimes contain \n.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.)

  • Custom User Avatar

    Using Q rather than : to enter ex mode should work as well, IMO