map() is returning only part of arguments
<p>I have the following code:</p>

<pre><code>a = '0'
b = '256'
mod_add = ['300', '129', '139']
list(map(lambda a, b, x: (a &lt; x) and (x &lt; b), a, b, mod_add))
</code></pre>

<p>I'd like to check every element in mod_add, but </p>

<pre><code>list(map(lambda a, b, x: (a &lt; x) and (x &lt; b), a, b, mod_add))
</code></pre>

<p>returns only one <code>False</code>.
With some values <code>(a = '100', b = '200')</code> it returns <code>'False', 'False', 'False'</code>.</p>

<p>What am I doing wrong?</p>

<p>If you really have to use <code>map</code>:</p>

<pre><code>list(map(lambda x: (a &lt; x) and (x &lt; b), mod_add))
</code></pre>

<p>Edit:</p>

<p>In response to the desire to <code>map</code> only one element from the list, it really doesn't make such sense to me to do that. But if that's what you wish to do, you can try:</p>

<pre><code>list(map(lambda x: (a &lt; x) and (x &lt; b), [mod_add[0]]))
</code></pre>

<p>I hope this helps.</p>

python python-3.x