Find and return the earliest occurring word from a string which contains the most repeating letters
The core problem can be solved a lot quicker using the built-in max and making a generator that produces the maximum count of repeated letters. Note that max already takes the first occurrence of the maximum, as required by the challenge, but we need to take care to not compare the words lexicographically, as I did in a previous version, by using a key function. You should probably add testcases for this, such as "free greatest" -&gt; "free" and "greatest free" -&gt; "greatest".

from collections import Counter
from operator import itemgetter

def letter_count(s):
    words = s.split(" ")
    most_common_letters = (Counter(word).most_common(1)[0][1] for word in words)
    return max(zip(most_common_letters, words), key=itemgetter(0))[1]


This does not handle any of the edge cases, though. It fails if the most common letter is not an ASCII character, but we can easily get around this by removing all of those right at the start. I also added your check against the empty string, but improving it to exit early if there is nothing left after filtering for ASCII characters, including the case that only spaces are left. I also split on all whitespace, not just single spaces, because this way multiple spaces are joined and all other whitespace characters have already been removed. I also use if not s instead of if s == "", because empty sequences are falsey and it sounds more like English this way.

from collections import Counter
from string import ascii_letters
from operator import itemgetter

ASCII_LETTERS = set(ascii_letters) | {" "}

def letter_count(s: str):
    """Return the word in s with the largest number of repeating letters


    &gt;&gt;&gt; letter_count(s="Today, is the greatest day ever!")
    'greatest'
    &gt;&gt;&gt; letter_count(s="!!!Today, is the &gt;&gt;&gt;&gt;greatest day ever!")
    'greatest'
    &gt;&gt;&gt; letter_count(s="!!!Today, is the greatest &gt;&gt;&gt;&gt; day ever!")
    'greatest'
    &gt;&gt;&gt; letter_count(s="!!!Today, is the greatest &gt;&gt;&gt;&gt; day ever xx!")
    'greatest'
    &gt;&gt;&gt; letter_count(s="Today, is thee greatest day ever!")
    'thee'
    &gt;&gt;&gt; letter_count(s="!!! &gt;&gt;&gt;&gt;")
    -1
    &gt;&gt;&gt; letter_count(s="")
    -1
    &gt;&gt;&gt; letter_count(s="abcd efg hijk")
    -1
    """
    s = "".join(c for c in s if c in ASCII_LETTERS)
    if not s.replace(" ", ""):
        return -1
    words = s.split()
    most_common_letters = (Counter(word).most_common(1)[0][1] for word in words)
    best_word = max(zip(most_common_letters, words), key=itemgetter(0))
    return best_word[1] if best_word[0] &gt; 1 else -1


Note that the challenge design is not the best. Normally I would recommend against returning differing types from a function unless absolutely necessary. Having it return a string in most cases and sometimes an int can be dangerous. Better to at least return None, if you absolutely need a special value, or even better, just let the caller deal with an exception.

Otherwise your code looks quite alright. You have a docstring, tests and a main guard. I must say that your comments don't help me a lot, I personally prefer plain English or, even better, self-explanatory variable names. But naming things is hard, and you have already done a good enough job at that.