Created
August 23, 2016 02:24
-
-
Save rahulg/e22399da3a317d0277555e9ef356c32f 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 f(): | |
l = [] | |
def g(x): | |
l.append(x) | |
return l | |
return g | |
a = f() | |
b = f() | |
print(a(1)) | |
print(a(2)) | |
print(a(3)) | |
print(b(6)) | |
print(b(7)) | |
print(b(8)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment