This is my code:

def product(n):

product_list = []

total = 1

for number in n:

total = total * number

product_list.append(total)

return total

print product([3, 2, 1, 5])

It works but there is one thing that I don't understand.

For this part here:

total = 1

for number in n:

total = total * number

Why does the total have to equal 1 and after that, how does this part of the code actually multiply all the numbers in the list together? I seriously don't understand how it multiplies them together. Can someone explain this fully to me? It would be very much appreciated.