kyu_6.string_subpattern_recognition_1 package

Submodules

kyu_6.string_subpattern_recognition_1.has_subpattern module

Solution for -> String subpattern recognition I.

Created by Egor Kostan. GitHub: https://github.com/ikostan

kyu_6.string_subpattern_recognition_1.has_subpattern.has_subpattern(string: str) bool[source]

Recognition of string subpattern I.

In this kata you need to build a function to return either true/True or false/False if a string can be seen as the repetition of a simpler/shorter subpattern or not.

Strings will never be empty and can be composed of any character (just consider upper- and lowercase letters as different entities) and can be pretty long (keep an eye on performances!).

Parameters:

string

Returns:

kyu_6.string_subpattern_recognition_1.test_has_subpattern module

Test for -> String subpattern recognition I.

Created by Egor Kostan. GitHub: https://github.com/ikostan

class kyu_6.string_subpattern_recognition_1.test_has_subpattern.HasSubpatternTestCase(methodName='runTest')[source]

Bases: TestCase

Testing ‘has_subpattern’ function.

_classSetupFailed = False
_class_cleanups = []
test_has_subpattern()[source]

String subpattern recognition I.

Verify that ‘has_subpattern’ function to returns either true/True or false/False if a string can be seen as the repetition of a simpler/shorter subpattern or not. :return:

Module contents

String subpattern recognition I.