Created
February 4, 2020 15:41
-
-
Save leopard627/74f4725b4db75ce04cc310efdd5c586b to your computer and use it in GitHub Desktop.
learning_python example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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