Question: Given compatibility_data, formatted as in NUM_COMPATIBILITY_DATA, retur a list of lists with the following structure: [ [n1, [all compatible nums for n1],[al1 incompatible nums for

Given "compatibility_data, formatted as in NUM_COMPATIBILITY_DATA, retur a list of lists with the following structure: [ [n1, [all compatible nums for n1],[al1 incompatible nums for n1] [n2, [all compatible nums for n2], [all incompatible nums for n2] ] Each inner compatibility list will be sorted in increasing order, and the overall list should be sorted by the n 's. >> test_list =[1,2, YES' ,1,1, YES' ,1,4,NO] > build_numerology_list(test_list) [[1,[1,2],[4]]] > test_list =[3,1,NO,1,3,YES] > build_numerology_list(test_list) [[1,[3],[]],[3,[],[1]]] > test_list =[1,1, YES' ,1,2, YES' ,2,3, YES' ,3,1, YES' ,3,2, NO ' ] >>> build_numerology_list(test_list)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
