mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-04-20 04:37:36 +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
1b9bde3e34
commit
c5cd96925e
@ -21,8 +21,10 @@ def longest_word(sentence: str) -> str:
|
|||||||
'thousand'
|
'thousand'
|
||||||
"""
|
"""
|
||||||
words = sentence.split()
|
words = sentence.split()
|
||||||
return max(words, key=len) if words else ''
|
return max(words, key=len) if words else ""
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
from doctest import testmod
|
from doctest import testmod
|
||||||
|
|
||||||
testmod()
|
testmod()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user