擅长:python、mysql、java
<p><a href="https://docs.python.org/2/library/itertools.html" rel="nofollow noreferrer">https://docs.python.org/2/library/itertools.html</a></p>
<p>Itertools排列和组合就是你想要的。你知道吗</p>
<pre><code>itertools.permutations([1, 2, 3])
</code></pre>