Skip to content

Instantly share code, notes, and snippets.

@tmf16
Created October 20, 2012 02:03
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 tmf16/3921703 to your computer and use it in GitHub Desktop.
Save tmf16/3921703 to your computer and use it in GitHub Desktop.
可変長引数にtupleを渡す
>>> def func_tuple(*argv):
... print 'tuple ----'
... print argv
...
>>>
>>> t = (1, True, 'A')
>>>
>>> func_tuple(t)
tuple ----
((1, True, 'A'),)
>>>
>>> func_tuple(*t)
tuple ----
(1, True, 'A')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment