擅长:python、mysql、java
<p>您可以使用<a href="https://docs.python.org/3/library/random.html#random.choices" rel="nofollow noreferrer">random.choices</a>而不是<strong>随机选择</strong>。它是3.6版中的新版本。你知道吗</p>
<pre><code>ColourList = [R[0],O[0],Y[0],G[0],B[0],I[0],V[0]]
ColourSeq = random.choices(ColourList, k=6)
print(ColourSeq)
</code></pre>