itertoolsによる順列、組み合わせ、直積のお勉強 - Qiita

itertoolsを使うと順列や組み合わせをスッキリ書くことができます。>>> import itertools(a, b, c, d, e)の並べ方を考えてみます。>>> seq = ('a…