fork download
  1. from functools import reduce
  2. def add(x,y):
  3. return x+y
  4.  
  5. print(reduce(add,[1,2,3,4]))
  6. # your code goes here
  7. # your code goes here
  8. # your code goes here
Success #stdin #stdout 0.1s 14144KB
stdin
Standard input is empty
stdout
10