python: pointwise list sum
Question: 
    Input: two lists (list1, list2) of equal length
    Output: one list (result) of the same length, such that:
        result[i] = list1[i] + list2[i]
    

Is there any concise way to do that? Or is this the best:

    
    
    # Python 3
    assert len(list1) == len(list2)
    result = [list1[i] + list2[i] for i in range(len(list1))]
    


Answer: You can use the builtin
[zip](http://docs.python.org/release/3.1.3/library/functions.html#zip)
function, or you can also use do it mapping the two lists over the add
operator. Like this:

    
    
    from operator import add
    map(add, list1,list2)
    

