def split_word(word):
    if len(word) < 2:
        raise Exception(
            "You obviously need at least two letters to split a word")
    split_indexes = list(range(1, len(word)))
    for i in split_indexes:
        first_part = word[:i]
        second_part = word[i:]
        yield (first_part, second_part)

def split_word(word):
    split_indexes = list(range(0, len(word)))
    for i in split_indexes:
        first_part = word[:i]
        second_part = word[i:]
        yield (first_part, second_part)

Allow splitting to zero-length parts
Allow splitting to zero-length parts

  def split_word(word):
-     if len(word) < 2:
-         raise Exception(
-             "You obviously need at least two letters to split a word")
-     split_indexes = list(range(1, len(word)))
+     split_indexes = list(range(0, len(word)))
      for i in split_indexes:
          first_part = word[:i]
          second_part = word[i:]
          yield (first_part, second_part)
  
Allow splitting to zero-length parts
## Code Before:
def split_word(word):
    if len(word) < 2:
        raise Exception(
            "You obviously need at least two letters to split a word")
    split_indexes = list(range(1, len(word)))
    for i in split_indexes:
        first_part = word[:i]
        second_part = word[i:]
        yield (first_part, second_part)

## Instruction:
Allow splitting to zero-length parts
## Code After:
def split_word(word):
    split_indexes = list(range(0, len(word)))
    for i in split_indexes:
        first_part = word[:i]
        second_part = word[i:]
        yield (first_part, second_part)
