*args and **kwargs example : Varible length parameter : Function PYTHON TUTORIALS


PYTHON TUTORIALS » Function » Varible length parameter »

 

*args and **kwargs example


def a_function(a, b, *args, **kwargs):
    print "a is", a
    print "b is", b
    print "*args is this tuple:", args
    print "**kwargs is this dictionary:", kwargs



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Function
» Varible length parameter