在python3中可以采用如下方法:
函數(*(元組))
函數(**{字典})
如下例子:
function(*("whither", "canada?")) 元組
function(*(1, 2 + 3)) 元組
function(**{"a": "crunchy", "b": "frog"}) 字典
在python2中,可以使用apply來實現
def function(a, b):
print a, b
apply(function, ("whither", "canada?"))
apply(function, (1, 2 + 3))