mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-04-08 23:05:54 +00:00
Update longest_word_in_sentence.py
This commit is contained in:
parent
c5cd96925e
commit
7dd05d70d8
@ -23,8 +23,6 @@ def longest_word(sentence: str) -> str:
|
|||||||
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