Python reduce()

Jmnote (토론 | 기여)님의 2019년 5월 6일 (월) 03:16 판 (새 문서: ==개요== ;Python reduce() <source lang='python'> from functools import reduce a = [2, 3, 4, 5] print( reduce((lambda x, y: x*y), a) ) # 120 </source> ==같이 보기== * Python...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요

Python reduce()
from functools import reduce
a = [2, 3, 4, 5]
print( reduce((lambda x, y: x*y), a) )
# 120

2 같이 보기

3 참고

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