回答此问题可获得 20 贡献值,回答如果被采纳可获得 50 分。
<p>我有个问题。我试图从矩阵中的列表中删除一项,但当我试图从特定列表(es.matrix[0])中删除该项时,它会从矩阵中的每个列表中删除该项</p>
<p>代码如下:</p>
<pre><code>ap = 95
sp = [125, 150]
ch = 195
sett = []
giorno = []
for matt in range(ap,sp[0]+5,5):
giorno.append(matt)
for sera in range(sp[1],ch+5,5):
giorno.append(sera)
for i in range(5):
sett.append(giorno)
print(sett[1])
for i in range(0,5,2):
del sett[i][0]
print(sett[1])
</code></pre>
<p>输出:</p>
<pre><code>1st printf(sett[1]):
[95, 100, 105, 110, 115, 120, 125, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195]
2nd printf(sett[1]):
[110, 115, 120, 125, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195]
</code></pre>
<p>预期产量</p>
<pre><code>1st printf(sett[1]):
[95, 110, 115, 120, 125, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195]
2nd printf(sett[1]):
[95, 110, 115, 120, 125, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195]
</code></pre>
<p>请帮帮我</p>