Count Words
Верните количество слов в строке s (слова разделены пробелами).
Примеры
Ввод
"hello world"Вывод
2Ввод
" one two three "Вывод
3Ввод
""Вывод
0Нужно реализовать
def count_words(s: str) -> int:
Теги
strings
Connectez-vous pour voir l'historique des soumissions
Se connecterConnectez-vous pour utiliser le Mentor IA
Se connecterVisible tests
1
Input
"hello world"Expected
22
Input
" one two three "Expected
33
Input
""Expected
0Focus radio
Paused · SomaFM · Fluid