LearnPy Hub
← File Handling problems
Easy

Words in the File

Write the input line to s.txt, then read it back and print how many words it has.

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
Words in the File · Python practice problem · LearnPy Hub