Cartesian product: itertools.product(*iterables[, repeat])
1 2 3 4 5 6 |
|
The Cartesian product of two tuples:
1 2 3 4 5 6 7 8 |
|
排列:itertools.permutations(iterable[, r])
1 2 3 4 5 |
|
组合:itertools.combinations(iterable, r)
1 2 3 4 5 |
|
Combination (including self-repetition): itertools.combinations_with_replacement(iterable, r)
1 2 3 4 5 6 |
|
For example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|