Idiom for "reducing" a list with another list of methods
I came across a situation where I wanted to "reduce" one list of integers by another list of methods.

    >>> import operator
    >>> 
    >>> OPS = [operator.add, operator.sub, operator.add]
    >>> nums = [1,2,3,4]
    >>> 
    >>> OPS[2](OPS[1](OPS[0](nums[0],nums[1]),nums[2]),nums[3])
    4

for loop:

    >>> result = nums[0]
    >>> for i in range(1,len(nums)):
    ...     result = OPS[i-1](result,nums[i])
    ... 
    >>> print result
    4

"queues":

    >>> result = nums.pop(0)
    >>> while nums:
    ...     result = OPS.pop(0)(result, nums.pop(0))
    ... 
    >>> print result
    4

If I just wanted to apply one method to the list of numbers, for example operator.add, I could use reduce.

    >>> reduce(operator.add, [1,2,3,4])
    10

Is there something similar for combining two lists, one of operators and another of operands?

Idiom for "reducing" a list with another list of methods
===

I came across a situation where I wanted to "reduce" one list of integers by another list of methods.

    >>> import operator
    >>> 
    >>> OPS = [operator.add, operator.sub, operator.add]
    >>> nums = [1,2,3,4]
    >>> 
    >>> OPS[2](OPS[1](OPS[0](nums[0],nums[1]),nums[2]),nums[3])
    4

for loop:

    >>> result = nums[0]
    >>> for i in range(1,len(nums)):
    ...     result = OPS[i-1](result,nums[i])
    ... 
    >>> print result
    4

"queues":

    >>> result = nums.pop(0)
    >>> while nums:
    ...     result = OPS.pop(0)(result, nums.pop(0))
    ... 
    >>> print result
    4

If I just wanted to apply one method to the list of numbers, for example operator.add, I could use reduce.

    >>> reduce(operator.add, [1,2,3,4])
    10

Is there something similar for combining two lists, one of operators and another of operands?
