Write a python function that accepts a string from user as argument and display the total number of words.
# Write a python function that accepts a string from user as argument and display the
# total number of words.
inn = input("enter the word")
def co(e):
x = len(e.split())
print ("total number of words = ",x)
co(inn)
Comments
Post a Comment