[ create a new paste ] login | about

Link: http://codepad.org/010AxubW    [ raw code | output | fork ]

Python, pasted on Sep 4:
1
2
3
4
from operator import add
print reduce(add, ('a', 'b', 'c', 'd')) 
print reduce(add, (1, 2, 3, 4, 5))
print reduce(add, ([1, 2,], [3, 4], [5]))


Output:
1
2
3
abcd
15
[1, 2, 3, 4, 5]


Create a new paste based on this one


Comments: