Parameter passing: mixed with dictionary and tuple : Function Tuple Parameters « Function « Python






Parameter passing: mixed with dictionary and tuple

Parameter passing: mixed with dictionary and tuple

def f(a, *pargs, **kargs): print a, pargs, kargs

f(1, 2, 3, x=1, y=2)


           
       








Related examples in the same category

1.Any number of parameter: turn parameter into a tupleAny number of parameter: turn parameter into a tuple
2.Unpacking Argument ListsUnpacking Argument Lists
3.Arbitrary Argument Lists
4.Illustrate parameter passing: tuple, type and tupleIllustrate parameter passing: tuple, type and tuple
5.Re design the intersect and union using tuple parameter passing