Return True if item is empty string
<p>Please consider this snippet:</p>

<pre><code>&gt;&gt;&gt; i = ["", 1, 2]
&gt;&gt;&gt; all([x for x in i])
False
</code></pre>

<p>What would be Pythonic way to make this snippet return <code>True</code> even if item in iterable is empty string?</p>

<p>Standard restrictions should apply - if item is <code>None</code> or <code>False</code> etc, it should return False as expected.</p>

<pre><code>&gt;&gt;&gt; lst = ["", 1, 2]
&gt;&gt;&gt; 
&gt;&gt;&gt; all(True if i=='' else i for i in lst)
True
</code></pre>

<p>If you want True if there is at least one item that evaluates to True use <code>any()</code>.</p>

<pre><code>&gt;&gt;&gt; any(lst)
True
</code></pre>

<p>Note that in general <code>any()</code> and <code>all()</code> accept iterable argument and you don't need to loop over them.</p>

python