def diff_by_one(word_a, word_b):
    """Return True if 2 words differ only by one char"""

    if not word_a or not word_b:  # neither should be empty
        return False

    size_a = len(word_a)  # length should be same
    size_b = len(word_b)
    if size_a != size_b:
        return False

    if word_a == word_b:  # can't be the same
        return False

    found_diff = False
    for i in range(size_a):
        if word_a[i] != word_b[i]:
            if found_diff:
                return False
            found_diff = True

    return True