title: How to emulate sum() using a list comprehension?
body: <p>Is it possible to emulate something like sum() using <a href="http://en.wikipedia.org/wiki/List_comprehension#Python">list comprehension</a> ?</p>
  
  <p>For example - I need to calculate the product of all elements in a list :</p>
  
  <pre><code>list = [1, 2, 3]
  product = [magic_here for i in list]
  
  #product is expected to be 6
  </code></pre>
  
  <p>Code that is doing the same : </p>
  
  <pre><code>def product_of(input):
     result = 1
     for i in input:
        result *= i
     return result
  </code></pre>