kyu_8.convert_string_to_an_array package

Submodules

kyu_8.convert_string_to_an_array.string_to_array module

Solution for -> Convert a string to an array.

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

kyu_8.convert_string_to_an_array.string_to_array.string_to_array(s: str) list[source]

Split a string and convert it into an array of words.

Parameters:

s – str

Returns:

list

kyu_8.convert_string_to_an_array.test_string_to_array module

Test for -> Convert a string to an array.

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

class kyu_8.convert_string_to_an_array.test_string_to_array.StringToArrayTestCase(methodName='runTest')[source]

Bases: TestCase

Testing string_to_array function.

_classSetupFailed = False
_class_cleanups = []
test_string_to_array = None
test_string_to_array_0_Robin_Singh(**kw)

Testing string_to_array function [with s=’Robin Singh’, expected=[‘Robin’, ‘Singh’]].

A function to split a string and convert it into an array of words. :return:

test_string_to_array_1_CodeWars(**kw)

Testing string_to_array function [with s=’CodeWars’, expected=[‘CodeWars’]].

A function to split a string and convert it into an array of words. :return:

test_string_to_array_2_I_love_arrays_they_are_my_favorite(**kw)

Testing string_to_array function [with s=’I love arrays they are my favorite’, expected=[‘I’, ‘love’, ‘arrays’, ‘they’, ‘are’, ‘my’, ‘favorite’]].

A function to split a string and convert it into an array of words. :return:

test_string_to_array_3_1_2_3(**kw)

Testing string_to_array function [with s=’1 2 3’, expected=[‘1’, ‘2’, ‘3’]].

A function to split a string and convert it into an array of words. :return:

test_string_to_array_4_(**kw)

Testing string_to_array function [with s=’’, expected=[‘’]].

A function to split a string and convert it into an array of words. :return:

Module contents

Convert a string to an array.