Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python fast plz Define a function named create consonant dictionary words) which takes a list of words as a parameter. The function returns a dictionary

python

image text in transcribed

image text in transcribed

fast plz

Define a function named create consonant dictionary words) which takes a list of words as a parameter. The function returns a dictionary where the keys are consonants in lowercase and the corresponding values are the list of word lengths for words in the list that start with that consonant. The lists of numbers must be in sorted ascending order. Note: you can assure there will be no punctuation characters in the parameter list (e. only letters) and the list is not empty. You should convert all words to lower case. For example: Test Result stearnsacculus) 1 151 words = ['Technology', 'affects",the" .way a_dict create_consonant_dictionary words) for key in sorted(a_dict.keys(): print(key, a dict(key]) Define a function named create consonant dictionario which takes a list of words as a parameter. The function returns a dictionary where the keys are consonants in lowercase and the corresponding values are the list of word lengths for all words in the list that start with that consonant. The lists of numbers must be in corted ascending order. Note: you can assume there will be no punctuation characters in the parameter liste only letter and the st is not empty. You should convert all words to lower case. For example: Result 15 = ['Technology', 'affects', 'they teace Slearn', 'sacculus'] 1 [5] create_consonant_dictionary (wards) $ 18, 82 key in sorted(a_dict.keys (): t [3, 5, 5, 103 print(key, a_dict[key]) w (3)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Lean Accounting Guidebook

Authors: Steven M. Bragg

4th Edition

1642210374, 9781642210378

Students also viewed these Databases questions