Skip to content

Instantly share code, notes, and snippets.

@felipernb
Created January 28, 2011 12:22
Show Gist options
  • Save felipernb/800188 to your computer and use it in GitHub Desktop.
Save felipernb/800188 to your computer and use it in GitHub Desktop.
Where's the reference to L?
def f(a, L=[]):
L.append(a)
return L
print f(1)
print f(2)
print f(3)
@felipernb
Copy link
Author

Onde fica a porra da referência para L? É uma global esdrúxula? Ou a função guarda estado :O?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment