Question: Python 3.6 Question 12 20 points Write a function named wordLengths that takes one string parameter, text You may assume that the given text contains
Python 3.6

Question 12 20 points Write a function named wordLengths that takes one string parameter, text You may assume that the given text contains only letters and white space Input: Return a dictionary in which each key is the length of a word in text and the corresponding value is the number of words of that length For example, the following would be correct output text = 'Go to Heaven for the climate Hell for the company' print(wordLengths(text)) 12: 2, 3: 4, 4: 1, 6: 1, 7: 2)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
