Question: Python Question 3: (20 points) Consider a dictionary where keys are item labels and values are tuples of category labels. Write a function that takes
Question 3: (20 points) Consider a dictionary where keys are item labels and values are tuples of category labels. Write a function that takes such a dictionary and a category label as inputs and returns a list of all the items that has that category in their category list. For example, given {":("c1",), "6":("c1","c2","c3"), "c":("c1","c3"), "d":("c2","c3")} and ctg="c2", your function should return ("5", "d"] def item_cats(d, ctg): return Question 4: (25 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
