title: Get the (multiplicative) product of a tuple or list?
body: <p>Let's say I have a </p>
  
  <pre><code>class Rectangle(object):                                               
  def __init__(self, length, width, height=0):                                                   
      self.l = length                                               
      self.w = width                                                
      self.h = height                                               
      if not self.h:                                                     
          self.a = self.l * self.w                                       
      else:                                                              
          from itertools import combinations                            
          args = [self.l, self.w, self.h]                                
          self.a = sum(x*y for x,y in combinations(args, 2)) * 2
                   # original code:
                   # (self.l * self.w * 2) + \                            
                   # (self.l * self.h * 2) + \                            
                   # (self.w * self.h * 2)                                
          self.v = self.l * self.w * self.h                                           
  </code></pre>
  
  <p>What's everyone's take on line 12?</p>
  
  <pre><code>self.a = sum(x*y for x,y in combinations(args, 2)) * 2 
  </code></pre>
  
  <p><strike>I've heard that explicit list index references should be avoided.</strike></p>
  
  <p><strike>Is there a function I can use that acts like <code>sum()</code>, but only for multiplication?</strike></p>
  
  <p>Thanks for the help everyone. </p>