Created
October 11, 2021 03:37
-
-
Save ycui1/c18deb13bd1d61c1addd1245b8e14cd6 to your computer and use it in GitHub Desktop.
This file contains 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
>>> from functools import partial | |
>>> def incrementer(start, step): | |
... return start + step | |
... | |
>>> incrementer_by_one = partial(incrementer, step=1) | |
>>> incrementer_by_one(5) | |
6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment