擅长:python、mysql、java
<p>您只需使用<a href="https://docs.python.org/3/tutorial/datastructures.html#the-del-statement" rel="noreferrer">^{<cd1>}</a>从每一行中删除适当的元素:</p>
<pre><code>L = [[1,2,3,4],
[5,6,7,8],
[9,1,2,3]]
for row in L:
del row[1] # 0 for column 1, 1 for column 2, etc.
print L
# outputs [[1, 3, 4], [5, 7, 8], [9, 2, 3]]
</code></pre>