"함수 reduce()"의 두 판 사이의 차이

14번째 줄: 14번째 줄:
*[[filter]]
*[[filter]]
*[[lambda function]]
*[[lambda function]]
*[[맵리듀스 프로그래밍 모델]

2014년 9월 7일 (일) 20:54 판

reduce

1 Python

Python 3
import functools
print( functools.reduce(lambda x, y: x + y, numbers) )
# 21

2 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}