Count Words

Верните количество слов в строке s (слова разделены пробелами).

Примеры

Ввод
"hello world"
Вывод
2
Ввод
" one two three "
Вывод
3
Ввод
""
Вывод
0

Нужно реализовать

def count_words(s: str) -> int:

Теги

strings
PostgreSQLv16

Aquí aparecerá el resultado de la ejecución del código

Visible tests
1
Input
"hello world"
Expected2
2
Input
" one two three "
Expected3
3
Input
""
Expected0
Focus radio
Paused · SomaFM · Fluid