擅长:python、mysql、java
<p>在您的问题中没有像<code>where</code>这样的特殊语法,但是您始终可以在<code>for</code>循环中使用<code>if</code>语句,就像在任何其他语言中一样:</p>
<pre><code>for item in items:
if item > 3:
# Your logic here
</code></pre>
<p>或者一个保护条款(同样,像其他语言一样):</p>
<pre><code>for item in items:
if not (item > 3): continue
# Your logic here
</code></pre>
<p>这两种枯燥的方法几乎和一种特殊的语法一样简洁易读。</p>