Created
August 22, 2017 06:40
-
-
Save kunpengku/b0301c02fed9371d48379ec8ce0b0e9d to your computer and use it in GitHub Desktop.
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 functools | |
def add(a, b): | |
return a + b | |
add(4, 2) | |
6 | |
plus3 = functools.partial(add, 3) | |
plus5 = functools.partial(add, 5) | |
plus3(4) | |
7 | |
plus3(7) | |
10 | |
plus5(10) | |
15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment