擅长:python、mysql、java
<p>您可能需要使用<a href="https://docs.python.org/2/library/itertools.html#itertools.permutations" rel="nofollow noreferrer">^{<cd1>}</a>函数:</p>
<pre><code>import itertools
chars = '123ABC'
for i in xrange(1, len(chars)+1):
print list(itertools.permutations(chars, i))
</code></pre>
<p>编辑:
要获取字符串列表,请尝试以下操作:</p>
^{pr2}$