Question #242347

write a program to print number of characters in each word in an input.

input: "hello This is hari"

output:

5

4

2

4


Expert's answer

text = input()
words = text.split(" ")
for word in words:
  print(len(word))
LATEST TUTORIALS
APPROVED BY CLIENTS