Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save igauravsehrawat/846d7ee444855f9519acc17dd109f87c to your computer and use it in GitHub Desktop.
Save igauravsehrawat/846d7ee444855f9519acc17dd109f87c to your computer and use it in GitHub Desktop.
Brain teaser
def foo(i, a=[]):
a.append(a.append(i))
return a
for i in range(3):
b = foo(i)
print(b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment