top of page
Search

PYTHON CODING

  • Writer: waclaw_koscielniak
    waclaw_koscielniak
  • Oct 3
  • 1 min read

from functools import reduce

nums = [2, 3, 4]

product = reduce(lambda x, y: x * y, nums)

nums.append(5)

s = reduce(lambda x, y: x + y, nums, 10)

print(product, s)


[Running] python3 -u "/Users/name/test/test643.py"

24 24


[Done] exited with code=0 in 0.069 seconds



Try to verify.
Try to verify.

















 
 
 

1 Comment


Guest
Oct 03

Did you verify it yourself?

Like
bottom of page