While looking up concise ways to calculate the product of a list, I was a little confused by this response. Here's the code in question:
reduce(lambda x,y:x*y,[3,4,5])
Can someone explain why this works? I'm familiar with using lambda
expressions involving one variable (e.g. when using a custom compare function for sorting) but am confused why and how this works.