<p>我想用python生成一个10个字母数字的字符串。所以这里是从字母数字字符列表中选择随机索引的一部分。</p>
<p><strong>我的计划</strong>:</p>
<pre><code>set_list = ['a','b','c' ........] # all the way till I finish [a-zA-Z0-9]
index = random() # will use python's random generator
some_char = setlist[index]
</code></pre>
<p>有没有更好的随机选择角色的方法?</p>