diff --git a/strings/longest_word_in_sentence.py b/strings/longest_word_in_sentence.py index f3fc36b8f..4389236d8 100644 --- a/strings/longest_word_in_sentence.py +++ b/strings/longest_word_in_sentence.py @@ -21,8 +21,10 @@ def longest_word(sentence: str) -> str: 'thousand' """ words = sentence.split() - return max(words, key=len) if words else '' + return max(words, key=len) if words else "" + if __name__ == "__main__": from doctest import testmod + testmod()