LearnPy Hub
← Functions problems
Easy

count_words(text)

Write count_words(text) that returns the number of words in a line. Read a line and print the result.

Input

One line.

Output

One integer.

Sample 1

Input
I love Python
Output
3

Sample 2

Input
hello
Output
1
solution.py
Output appears here
count_words(text) · Python practice problem · LearnPy Hub