擅长:python、mysql、java
<p>在第二个for循环中,您将<em>相同的</em>列表添加到<code>List</code>n次</p>
<pre><code>for i in range(n):
List.append(listx)
</code></pre>
<p>您需要复制<code>listx</code>&;使用<code>List</code>中的那些。像这样:</p>
<pre><code>for i in range(n):
List.append(listx[::])
</code></pre>
<p><code>listx[::]</code>制作<code>listx</code>的副本以供使用</p>