In python, I have a dictionary like this...
pleio = {\'firstLine\': {\'enf1\': [\'54\', \'set\'],
\'enf2\': [\'48\', \'free\'],
If you want all pair combinations, you could probably use the following which is shorter, but I would not say this is more efficient.
[dict([(x,vx),(y,vy)]) for (x,vx) in pleio['firstLine'].iteritems()
for (y,vy) in pleio['firstLine'].iteritems()
if x < y]
Output
[{'enf3': ['34', 'set'], 'enf4': ['12', 'free']},
{'enf2': ['48', 'free'], 'enf3': ['34', 'set']},
{'enf2': ['48', 'free'], 'enf4': ['12', 'free']},
{'enf1': ['54', 'set'], 'enf3': ['34', 'set']},
{'enf1': ['54', 'set'], 'enf2': ['48', 'free']},
{'enf1': ['54', 'set'], 'enf4': ['12', 'free']}]