Python: if/else in dict comprehension?
<p>In python2.7+ exist any way to make something like:</p>

<pre><code>{ something_if_true if condition else something_if_false for key, value in dict_.items() }
</code></pre>

<p>I know you can make anything with just 'if'</p>

<pre><code>{ something_if_true for key, value in doct_items() if condition}
</code></pre>
