kyu_6.format_string_of_names package

Submodules

kyu_6.format_string_of_names.solution module

kyu_6.format_string_of_names.solution.namelist(names: list) → str[source]

Format a string of names like ‘Bart, Lisa & Maggie’

Parameters

names – an array containing hashes of names

Returns

a string formatted as a list of names separated by commas except for the last two names, which should be separated by an ampersand.

kyu_6.format_string_of_names.test_namelist module

class kyu_6.format_string_of_names.test_namelist.NamelistTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Testing namelist function

test_namelist()[source]

Test namelist

Given: an array containing hashes of names

Return: a string formatted as a list of names separated by commas except for the last two names, which should be separated by an ampersand.

Returns

Module contents