kyu_4.strings_mix package

Submodules

kyu_4.strings_mix.solution module

Strings Mix

kyu_4.strings_mix.solution.get_counters(s: str) → dict[source]
kyu_4.strings_mix.solution.mix(s1: str, s2: str) → str[source]

Given two strings s1 and s2, we want to visualize how different the two strings are. We will only take into account the lowercase letters (a to z). First let us count the frequency of each lowercase letters in s1 and s2. :param s1: string a :param s2: string b :return: the difference between two strings

kyu_4.strings_mix.solution.sort_results(results: list) → list[source]

The results will be in decreasing order of their length and when they have the same length sorted in ascending lexicographic order (letters and digits - more precisely sorted by code-point) :param results: :return:

kyu_4.strings_mix.test_mix module

Testing ‘mix’ function

class kyu_4.strings_mix.test_mix.MixTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_smix()[source]

Testing ‘mix’ function

Given two strings s1 and s2, the ‘mix’ function should visualize how different the two strings are.

Module contents