Question: Please use python and follow doc string thanks def invert bdm (bdm) '(dict of (str:dict of (int:list of str)-> dict of strlist of [str, int]
Please use python and follow doc string thanks
def invert bdm (bdm) '(dict of (str:dict of (int:list of str)-> dict of strlist of [str, int] l Given bdm, a birthday month dictionary, return the equivalent birthday dictionary where keys are birthmonths and values are dictionaries that have keys as dates and values as list of names with people whose birthday is on that date. See section 1.2 of the related handout for more information >>> d= {"Jan" : {1: ["Steve"), 5: ["Bob"]), "Aug":24: ["Sadia", "Tony"] >>> d2-invert bdm (d) >>> {"Steve " : ["Jan", j, "Bob": ["Jan", 5j, Tony": ["Aug", 24], "Sadia": "Aug", 24] def most total (bdm) ''(dict of (str: dict of (int: list of strh) -str bdm is a birthday month dictionary with at least one key. Return the name of the month with the most total days on which someone has a birthday. If there is a tie, return any month with that maximum >>d "Jan": 1: ["Steve"l,"Bob",31: ["Ron", "Aug":l: ["Jim","Tim", 24: ["Sadia", "Tony"] >>>most total (d) Aug pass
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
