Skip to content

Instantly share code, notes, and snippets.

@rahulg
Created August 23, 2016 02:24
Show Gist options
  • Save rahulg/e22399da3a317d0277555e9ef356c32f to your computer and use it in GitHub Desktop.
Save rahulg/e22399da3a317d0277555e9ef356c32f to your computer and use it in GitHub Desktop.
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