parted_permutations#

parted_permutations(d)#

Returns “parted” permutations of keys of d split by values (partition values, classes) of d. e.g. d = {‘a’:0, ‘b’:0, ‘c’:0, ‘x’:1, ‘y’:1, ‘q’:2} -> abc-xy-q, abc-yx-q, acb-xy-q, acb-yx-q, … , cba-yx-q