From c5cd96925e6e8034b3bb03dc24d54239e612f48b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 7 Jul 2024 04:39:19 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- strings/longest_word_in_sentence.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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()