Given a list [a, b, c, d]
I'd like to call a function foo()
which returns a number and multiply the return values:
result = foo(a, b) * foo(b, c) * foo(c, d)
What would be the pythonic one-liner for this? The C-Programmer inside me would start fiddling about with indices and for loops but I know there must be a better way..