擅长:python、mysql、java
<p>您生成的代码似乎扩展到:</p>
<pre><code>E0=zbc
E1=2.3
</code></pre>
<p>在循环的下一次迭代中,您将得到一个IndexError异常,因为<code>a</code>只有两个元素长。在</p>
<p>因此,鉴于上述情况,您正试图将<code>zbc</code>的值赋给<code>E0</code>。如果<code>zbc</code>不存在(似乎不存在),那么您将得到您提到的namererror。在</p>
<p>很难确定您到底想用这段代码做什么,所以我不确定该推荐什么。您可以指定字符串:</p>
^{pr2}$
<p>这将扩展到:</p>
<pre><code>E0="zbc"
E1="2.3"
</code></pre>
<p>仍然会得到索引器错误,因为数组<code>a</code>不是5个元素长。这对你来说应该是个容易的办法。在</p>