Answer to Question #76254 in Python for Brandon
Write a program that counts the number of words in a sentence entered by the user.
Use input to get the sentence as a string;use string.split() to create a list of the words.
Then the length of the list is the number of words.
string = input('Please input sentence: ')
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!