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

3번째 줄: 3번째 줄:
==Python==
==Python==
[[category: Python]]
[[category: Python]]
{{참고|Python 3}}
{{소스헤더|Python 3}}
<source lang='Python'>
<source lang='Python'>
from functools import reduce
from functools import reduce

2019년 5월 6일 (월) 03:14 판

reduce

1 Python

Python 3
from functools import reduce
product = reduce((lambda x, y: x * y), [1, 2, 3, 4])
# 24

2 같이 보기

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