Skip to content

Commit b6821d8

Browse files
authored
Create reduce_test.py
1 parent 16e8b35 commit b6821d8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

05-6/reduce_test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# reduce_test.py
2+
import functools
3+
4+
data = [1, 2, 3, 4, 5]
5+
result = functools.reduce(lambda x, y: x + y, data)
6+
print(result) # 15 출력

0 commit comments

Comments
 (0)