mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-04-23 06:07:37 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
1c7710de38
commit
b31d2b2912
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user