Skip to content

Instantly share code, notes, and snippets.

@leopard627
Created February 4, 2020 15:41
Show Gist options
  • Select an option

  • Save leopard627/74f4725b4db75ce04cc310efdd5c586b to your computer and use it in GitHub Desktop.

Select an option

Save leopard627/74f4725b4db75ce04cc310efdd5c586b to your computer and use it in GitHub Desktop.
learning_python example
import operator, functools
functools.reduce(operator.add, [1, 2, 3, 4, 5])
>> 15
functools.reduce((lambda x, y: x + y), [1, 2, 3, 4, 5])
>> 120
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment