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))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS