title: int object is not iterable python
body: <p>I am trying to learn python reduce function. </p>
  
  <p>This is some code that does not make sense to me</p>
  
  <pre><code>&gt;&gt;&gt; x = [1,2,3]
  &gt;&gt;&gt; reduce(sum, [b for b in x if b &gt; 0])
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  TypeError: 'int' object is not iterable
  &gt;&gt;&gt; reduce(sum, [b for b in x if b &gt; 2])
  3
  </code></pre>
  
  <p>Why does it work when b > 2 but not b > 0</p>
  
  <p>The code seems almost exactly the same</p>