Last active
June 1, 2020 06:42
-
-
Save eclecticmiraclecat/6b287e5b3d7977fb76305f7b88abb059 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
>>> def add(x, y): | |
... return x+y | |
... | |
>>> add(2,3) | |
5 | |
>>> | |
>>> a = lambda : add(2,3) | |
>>> a | |
<function <lambda> at 0x7f95b61a0ae8> | |
>>> a() | |
5 | |
>>> def do_add(x, y): | |
... def add(): | |
... return x +y | |
... return add | |
... | |
>>> | |
>>> a = do_add(2,3) | |
>>> a() | |
5 | |
>>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment