擅长:python、mysql、java
<p>你为什么不这样迭代列表:</p>
<pre><code>for row in results:
for item in row:
print(item.azWord)
</code></pre>
<p>因为在你的例子中<code>results[x][y]</code>是不正确的。<code>y</code>是一个对象,而不是<code>int</code>,因此不能使用它从<code>results</code>索引。我只需要使用上面的代码来拉动对象本身。你知道吗</p>
<p>或者使用更接近原始代码的东西</p>
<pre><code>for x in range(0,maxL):
for y in results[x]:
print(y.azWord) # note y is the object itself, not an index
</code></pre>