擅长:python、mysql、java
<p>不是将条件放入<code>index</code>的定义中,而是发现错误处理如下:</p>
<pre><code>try:
index = [y for y, s in enumerate(data_time_filtered) if next0 in s]
data_filtered.append(data_time_filtered[index[0]])
except IndexError:
missing_data.append(next0)
</code></pre>
<p>更实用的是可以在<code>except IndexError</code>部分中包含更多的条件或循环。你知道吗</p>