From b31d2b29120d9a8e9d02b0af3e4beae84095b616 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 5 Jul 2024 05:01:45 +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 202c19175..ed1da448f 100644 --- a/strings/longest_word_in_sentence.py +++ b/strings/longest_word_in_sentence.py @@ -12,8 +12,10 @@ def longest_word(sentence: str) -> str: 'a' """ 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()