Shortest Word Length
In text analysis, it is often useful to quickly find the shortest word, for example when checking phrases or collecting simple stats. Write find_short, which takes a non-empty string s containing words separated by spaces. Return the length of the shortest word.
Примеры
Ввод
"bitcoin take over the world maybe who knows perhaps"Вывод
3Ввод
"turns out random test cases are easier than writing out basic ones"Вывод
3Ввод
"lets talk about javascript the best language"Вывод
3Нужно реализовать
def find_short(s: str) -> int:
Теги
strings
Jelentkezz be a beküldési előzmények megtekintéséhez
BejelentkezésJelentkezz be az MI-mentor használatához
BejelentkezésVisible tests
1
Input
"bitcoin take over the world maybe who knows perhaps"Expected
32
Input
"turns out random test cases are easier than writing out basic ones"Expected
33
Input
"lets talk about javascript the best language"Expected
34
Input
"i want to travel the world writing code one day"Expected
15
Input
"Lorem ipsum dolor sit amet"Expected
36
Input
"a"Expected
1Focus radio
Paused · SomaFM · Fluid