Skip to content

Instantly share code, notes, and snippets.

@superbobry
Created February 26, 2012 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save superbobry/1917188 to your computer and use it in GitHub Desktop.
Save superbobry/1917188 to your computer and use it in GitHub Desktop.
Iterable unpacking in Python
>>> def f((x, y)): return x + y
...
>>> def gen():
... yield 1
... yield 2
...
>>>
>>> f(gen())
3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment