for key in dictionary if key ==x:
<p>I am wondering if there is a similar way to enforce an if clause in a for loop as it is in a list comprehension. So I am looking to have a similar structure to </p>

<pre><code>[ expression for item in list if conditional ]
</code></pre>

<p>in a loop, so sth like</p>

<pre><code>for item in list if conditional:
    expression
</code></pre>

<p>I know that I could just add the conditional in the next line, however I was wondering if that can be built in the for loop already</p>
