Answer to Question #242347 in Python for hari

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


1
Expert's answer
2021-09-26T02:42:51-0400
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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS