kyu_6.string_transformer package¶
Submodules¶
kyu_6.string_transformer.string_transformer module¶
-
kyu_6.string_transformer.string_transformer.
string_transformer
(s: str) → str[source]¶ Given a string, return a new string that has transformed based on the input:
1. Change case of every character, ie. lower case to upper case, upper case to lower case. 2. Reverse the order of words from the input.
Note: You will have to handle multiple spaces, and leading/trailing spaces.
You may assume the input only contain English alphabet and spaces. :param s: :return:
kyu_6.string_transformer.test_string_transformer module¶
-
class
kyu_6.string_transformer.test_string_transformer.
StringTransformerTestCase
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Testing string_transformer function
-
test_string_transformer
()[source]¶ Testing string_transformer function with multiple test data.
Given a string, return a new string that has transformed based on the input:
1. Change case of every character, ie. lower case to upper case, upper case to lower case. 2. Reverse the order of words from the input.
- Returns
-