Discover answers to your most pressing questions at Westonci.ca, the ultimate Q&A platform that connects you with expert solutions. Explore our Q&A platform to find reliable answers from a wide range of experts in different fields. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform.
Sagot :
Answer:
The program in Python is as follows:
wordInput = input()
myList = wordInput.split(" ")
for i in myList:
print(i,myList.count(i))
Explanation:
This gets input for the word
wordInput = input()
This splits the word into a list using space as the delimiter
myList = wordInput.split(" ")
This iterates through the list
for i in myList:
Print each word and its count
print(i,myList.count(i))
We hope you found this helpful. Feel free to come back anytime for more accurate answers and updated information. We hope you found what you were looking for. Feel free to revisit us for more answers and updated information. We're glad you chose Westonci.ca. Revisit us for updated answers from our knowledgeable team.