Skip to content

227p lambda 질문 #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
heeeeeseok opened this issue Jan 25, 2022 · 1 comment
Open

227p lambda 질문 #144

heeeeeseok opened this issue Jan 25, 2022 · 1 comment

Comments

@heeeeeseok
Copy link

227p에서 functools.reduce(lambda x, y: x*10 + y, a, 0) 부분에서 매개변수 0이 추가되는 이유는 무엇인가요? 0을 빼고 실행해도 결과는 똑같이 나와서 질문합니다. ㅠ

@likejazz
Copy link
Collaborator

likejazz commented Feb 2, 2022

0은 초깃값이며 생략 가능합니다. 책에서는 좀 더 명확히 하기 위해 사용하였습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants