derangements

emlib.combinatorics.derangements(seq)[source]

compute permutations of seq where each element is not in its original position

Return type:

Generator[List[TypeVar(T)], None, None]