kyu_6.first_character_that_repeats package

Submodules

kyu_6.first_character_that_repeats.first_character_that_repeats module

Solution for -> First character that repeats.

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

kyu_6.first_character_that_repeats.first_character_that_repeats.first_dup(word: str) str | None[source]

Find the first character that repeats in a String and return that character.

Parameters:

word – string

Returns:

string, None

kyu_6.first_character_that_repeats.test_first_character_that_repeats module

Test for -> First character that repeats.

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

class kyu_6.first_character_that_repeats.test_first_character_that_repeats.FirstDupTestCase(methodName='runTest')[source]

Bases: TestCase

Testing first_dup function.

_classSetupFailed = False
_class_cleanups = []
test_first_alpha_only()[source]

Test string with alphabet chars only.

Returns:

test_first_dup_mixed()[source]

Test string with mixed type of chars.

Returns:

test_first_dup_none()[source]

Test string with no duplicate chars.

Find the first character that repeats in a String and return that character. :return:

test_first_no_alpha()[source]

Test string with no alphabet chars.

Returns:

test_first_space()[source]

Repeating char is a space.

Returns:

Module contents

First character that repeats.