Skip to content

227p lambda 질문 #144

Description

@heeeeeseok

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

Activity

  1. likejazz commented on Feb 2, 2022

    @likejazz
    Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions