I would like to take a list of dictionaries and create a new list of permutations in a specific format.
For example, I've got a list below with dictionaries in it. I would like to create all possible lists using these items in a specific format:
(e.g. result=[dict of type A, dict of type B, dict of type B, dict of type C, dict of type C, dict of Type D, dict of type E, dict of type F]) where the two items of type B cannot be equal and the two items of type C cannot be equal. I will be processing a large set of items so any tips on how to process the permutations more efficiently would be helpful.
{'Items':[
{'Name':'name10','Type':'A','measure1':20,'measure2':20},
{'Name':'name20','Type':'A','measure1':25,'measure2':30},
{'Name':'name30','Type':'B','measure1':15,'measure2':40},
{'Name':'name40','Type':'B','measure1':20,'measure2':50},
{'Name':'name50','Type':'B','measure1':25,'measure2':60},
{'Name':'name60','Type':'C','measure1':15,'measure2':70},
{'Name':'name70','Type':'C','measure1':20,'measure2':80},
{'Name':'name80','Type':'C','measure1':25,'measure2':90},
{'Name':'name90','Type':'D','measure1':10,'measure2':30},
{'Name':'name85','Type':'D','measure1':15,'measure2':30},
{'Name':'name75','Type':'E','measure1':53,'measure2':30},
{'Name':'name65','Type':'E','measure1':10,'measure2':30},
{'Name':'name55','Type':'F','measure1':56,'measure2':10},
{'Name':'name45','Type':'F','measure1':10,'measure2':20}
]}