diff --git a/strings/longest_word_in_sentence.py b/strings/longest_word_in_sentence.py index 4389236d8..addfa860e 100644 --- a/strings/longest_word_in_sentence.py +++ b/strings/longest_word_in_sentence.py @@ -13,12 +13,12 @@ def longest_word(sentence: str) -> str: 'thousand' >>> longest_word("To be or not to be that is the question") 'question' - >>> longest_word("All that glitters is not gold") - 'glitters' >>> longest_word("Beauty is in the eye of the beholder") 'beholder' >>> longest_word("A picture is worth a thousand words") 'thousand' + >>> longest_word("All that glitters is not gold") + 'glitters' """ words = sentence.split() return max(words, key=len) if words else ""