Loading...
Loading...
Loading...
A form checker reports what a line is made of. Read one line and print three lines: the number of letters, the number of digits and the number of spaces.
Other characters, such as punctuation, are not counted.
Letters: x, Digits: y, Spaces: z.Example
Input
Order 66 ready!
Output
Letters: 10 Digits: 2 Spaces: 2
Letters 10, digits 2, spaces 2.
Try the problem first. Open one hint at a time.
Go through the characters with a loop and keep three counters.
isalpha() and isdigit() test one character; a space is ch == " ".
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor