# -*- coding: utf-8 -*-
from functools import reduce
def prod(L):
def fn(x, y):
return x * y
return reduce(fn, L)
#測試
print('3 * 5 * 7 * 9 =', prod([3, 5, 7, 9]))
if prod([3, 5, 7, 9]) == 945:
print('測試成功!')
else:
print('測試失敗!')
