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

1번째 줄: 1번째 줄:
 
;reduce


==Python==
==Python==

2014년 8월 21일 (목) 13:06 판

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 }}