
![]() | Variable number of ordinary arguments:
def somefunc(a, b, *rest):
for arg in rest:
# treat the rest...
# call:
somefunc(1.2, 9, 'one text', 'another text')
# ...........rest...........
|
![]() | Variable number of keyword arguments:
def somefunc(a, b, *rest, **kw):
#...
for arg in rest:
# work with arg...
for key in kw.keys():
# work kw[key]
|