I have a defaultdict of shape:
defaultdict(<function __main__.construct_dicts.<locals>.<lambda>>,
{1: defaultdict(set, {'A': {0, 1}}),
2: defaultdict(set, {'A': {1, 3}, 'E': {12, 14}}),
3: defaultdict(set,
{'A': {3, 6},
'C': {4, 7, 10},
'D': {5, 8, 11},
'E': {9, 12}})})
How can I put all the values into three lists, like:
lst_1 = [[0, 1]]
lst_2 = [[1, 3], [12, 14]]
lst_3 = [[3, 6], [4, 7], [7, 10], [5, 8], [8, 11], [9, 12]]
where, for a set of odd values, I repeat the last value in the old pair as the new value in the new pair, for example {5, 8, 11}
became [5, 8], [8, 11]
.