擅长:python、mysql、java
<p>在<a href="http://docs.python.org/dev/whatsnew/2.6.html" rel="noreferrer">Python 2.6</a>以后:</p>
<pre><code>import itertools
itertools.permutations([1,2,3])
</code></pre>
<p>(作为发电机返回。使用<code>list(permutations(l))</code>作为列表返回。)</p>