Question: Write a function called find _ most _ common that takes a single dictionary parameter. Assume the keys of the dictionary will be strings (
Write a function called findmostcommon that takes a single dictionary parameter. Assume the keys of the dictionary will be strings eg emoticons and each value will be a list of strings eg user ID's
i The function should find the key that has the longest list as a value and print out that key and the length of its list. Print in the following format:
: occurs times
NOTE: In order to get this format you must left justify the emoticon by and then right justify the number by if using string concatenation, one
less in
each case if passing multiple arguments to print. 'occurs' doesn't
need to be justified.
ii The function returns the key that had the longest list.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
