Skip to content

Instantly share code, notes, and snippets.

@tmf16
Created October 20, 2012 01:55
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/3921666 to your computer and use it in GitHub Desktop.
Save tmf16/3921666 to your computer and use it in GitHub Desktop.
可変長引数を次の関数へ
>>> def test(*argv):
... hoge(argv)
... fuga(*argv)
...
>>> def hoge(*argv):
... print argv
...
>>> def fuga(*argv):
... print argv
...
>>> test(1, 2, 3, 5, 7)
((1, 2, 3, 5, 7),)
(1, 2, 3, 5, 7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment