Question: Please use python lestion 1 Design and implement a function common_letters(words_list) that returns a list of letters that appear in all the words of words_list.

Please use python lestion 1 Design and implement a function common_letters(words_list) thatPlease use python

lestion 1 Design and implement a function common_letters(words_list) that returns a list of letters that appear in all the words of words_list. Requirements: - Uppercase and lowercase letters are considered the same. - The result must be in uppercase, sorted alphabetically and have no duplicates. For example: words_list =[ "McDonalds", "HappyMeal", "LemonTea"] print(f"Result: { common_letters(words_list) } ") Result: ['A', 'L', 'M'] Explanation: The letters that appeared in all three words are ' A ', ' L ' and ' M ' as highlighted: McDonalds,HappyMal,LemonTea.. (20 marks) Given the following 5 test cases, print the results from your function using this code: for t in cases: print(f"Result: \( \left.\{\text { common_letters(t) }\}^{\prime \prime} ight) \) (D marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!