itertools.permutations() code example Example: import permutations from itertools import permutations