kyu_7.the_first_non_repeated_character_in_string package

Submodules

kyu_7.the_first_non_repeated_character_in_string.first_non_repeated module

kyu_7.the_first_non_repeated_character_in_string.first_non_repeated.first_non_repeated(s: str)[source]

You need to write a function, that returns the first non-repeated character in the given string.

For example for string “test” function should return ‘e’. For string “teeter” function should return ‘r’.

If a string contains all unique characters, then return just the first character of the string. Example: for input “trend” function should return ‘t’

You can assume, that the input string has always non-zero length. :param s: :return:

kyu_7.the_first_non_repeated_character_in_string.test_first_non_repeated module

class kyu_7.the_first_non_repeated_character_in_string.test_first_non_repeated.FirstNonRepeatedTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Testing first_non_repeated function

test_first_non_repeated()[source]

Testing first_non_repeated function :return:

Module contents