Count Words
Верните количество слов в строке s (слова разделены пробелами).
Примеры
Ввод
"hello world"Вывод
2Ввод
" one two three "Вывод
3Ввод
""Вывод
0Нужно реализовать
def count_words(s: str) -> int:
Теги
strings
Logi sisse, et näha esituste ajalugu
Logi sisseLogi sisse, et kasutada AI mentorit
Logi sisseVisible tests
1
Input
"hello world"Expected
22
Input
" one two three "Expected
33
Input
""Expected
0Focus radio
Paused · SomaFM · Fluid