Skip to content

Instantly share code, notes, and snippets.

@wwgist
Created March 7, 2013 11:00
Show Gist options
  • Save wwgist/5107285 to your computer and use it in GitHub Desktop.
Save wwgist/5107285 to your computer and use it in GitHub Desktop.
PYTHON: list sum...
# start_list = [1,2,3,4,5]
result = reduce(lambda a,b: a+b, start_list)
# result = 120
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment