Created
October 20, 2012 02:03
-
-
Save tmf16/3921703 to your computer and use it in GitHub Desktop.
可変長引数にtupleを渡す
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> 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