kyu_4.strings_mix package
Submodules
kyu_4.strings_mix.solution module
Solution for -> Strings Mix.
Created by Egor Kostan. GitHub: https://github.com/ikostan
- kyu_4.strings_mix.solution.get_counters(s: str) dict[source]
Get counters.
- Parameters:
s – str
- Returns:
dict
- kyu_4.strings_mix.solution.mix(s1: str, s2: str) str[source]
Mix function.
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]
Sorting results function.
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
Test for -> Strings Mix.
Created by Egor Kostan. GitHub: https://github.com/ikostan
Module contents
Strings Mix package.