데카르트의 곱
import itertools
itertools.product('ABCD', repeat=2)
AA AB AC AD BA BB BC BD CA CB CC CD DA DB DC DD
import itertools
itertools.permutations('ABCD', 2)
AB AC AD BA BC BD CA CB CD DA DB DC
import itertools
itertools.combinations('ABCD', 2)
AB AC AD BC BC CD
import itertools
itertools.combinations_with_replacement('ABCD', 2)
AA AB AC AD BB BC BD CC CD DD