擅长:python、mysql、java
<p>非常重要的是<code>pots[0]</code>实际上具有您认为的价值。考虑以下代码:</p>
<pre><code>>>> pots = [[4, 6, 2, 1, 8, 9]]
>>> TherePotValue = 0
>>> for Therepot, member in enumerate(pots[0]):
TherePotValue = Therepot
print "(",Therepot,")", member
</code></pre>
<p>这将产生:</p>
<pre><code>( 0 ) 4
( 1 ) 6
( 2 ) 2
( 3 ) 1
( 4 ) 8
( 5 ) 9
>>> print TherePotValue
5
>>>
</code></pre>
<p>如果你看到<code>0</code>,我只能假设<code>pots[0]</code>只有一个元素。你知道吗</p>