Write a program to input any string and to find the number of words in the string.

4 views

1 Answers

str = “Honesty is the best policy”

words = str.split()

print len(words)

4 views