Write product(nums) using functools.reduce and a lambda (1 for an empty list).
product(nums)
functools.reduce
product([2, 3, 4]) → 24
product([]) → 1
Submit runs 4 tests, including hidden edge cases.
Run your code to see the output here.