I have a nested list like:
[ [aa,0] , [bb,1] , [cc,0] , [dd,2] , [ee,1] ]
is there a nice short code to separate this into new nested list where the result would look like this:
[ [ [aa,0] , [cc,0] ] , [ [bb,1] , [ee,1] ] , [ [dd,2] ] ]
Meaning that the second instance in list is the rule for the new nested list.
I hope this is understandable.
The nested list could for sure be much longer then described above.
all help is much appreciated!
Thanks in advance