Question: Make sure to check the code with the test cases Security Clearance Responsible Coding Function Name: security clearance Parameters: a list of tuples (list) Returns:
Make sure to check the code with the test cases

Security Clearance Responsible Coding Function Name: security clearance Parameters: a list of tuples (list) Returns: dictionary of organized security clearance information ( dict) Description: As computer scientists, we should always keep security in mind. We don't want unauthorized users accessing restricted files. The higher-ups give you a list of security infor- mation for each personnel: [(kind, level, name), (kind, level, name), (kind, level, name) etc) Your mission is to organize this list so that all of those with the same kind and level are grouped together for easier look up. The higher-ups specify that the format must be: {kindl: { Level1: [name2, name3, names, etc.), level2: [namel, name4, etc.), kind2: { level2: [name], names, etc.) Test Cases >>> info = [("Party", 1, "Literally everyone"), ("Party", 2, "Who do you know h ere?"), ("Party", 3, "Brothers only")] >>> print (security clearance(info)) {"Party" : {1 : ("Literally everyone"), 2: ["Who do you know here?"), 3: "Broth ers only"}} Rre s hawn Mendes"), ( op Secret", 3. >>> info = [("Top Secret", 3, "Drake"), ("Confidential", 2, "Shawn Mendes"), (" Unclassified", 1, "Pusha T"), ("Top Secret", 3, "LeBron James"), ("Confidential ", 1, "Future"), ("Confidential", 1, "Arizona Zervas")] >>> print (security_clearance(info)) {"Top Secret" : {3: ["Drake", "LeBron James"]}, "Confidential" : {2: ["Shawn Me ndes"), 1: ["Future", "Arizona Zervas"]}, "Unclassified" : {1: ["Pusha T"]}} , "Future"), (Confide
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
