reverse all words that are longer than the given length of characters in a sentence if unspecified length is taken as 0 reverselettershey wollef sroirraw 3 hey fellow warriors reverselettersnohtyp is nohtyp 2 python is python reverseletters1 12 123 1234 54321 654321 0 1 21 321 4321 12345 123456 reverselettersracecar racecar reverse all words that are longer than the given length of characters in a sentence if unspecified length is taken as 0 reverse_letters hey wollef sroirraw 3 hey fellow warriors reverse_letters nohtyp is nohtyp 2 python is python reverse_letters 1 12 123 1234 54321 654321 0 1 21 321 4321 12345 123456 reverse_letters racecar racecar
def reverse_letters(sentence: str, length: int = 0) -> str:
    
    return " ".join(
        "".join(word[::-1]) if len(word) > length else word for word in sentence.split()
    )


if __name__ == "__main__":
    import doctest

    doctest.testmod()
    print(reverse_letters("Hey wollef sroirraw"))