# parameter combinations # define functions in Python, you can use required parameters, default parameters, variable parameters, keyword arguments, and named keyword Parameters # the order in which the # parameters can be combined in these 5 must be: Required parameter, default parameter, Variable parameters, named keyword parameters, and keyword parameters # For example, define a function that contains several of the above parameters Def f1 (a, b, c=0, *args, **kw): print (' a = ', a, ' b = ', b, ' c = ', c , ' args = ', args, ' kw = ', kw) def f2 (A, b, c=0, *, d,  **KW): print (' a = ', a, ' b = ', b, ' c = ', c , ' d = ', d, ' kw = ', kw) # when a function call is made, the Python interpreter automatically passes the corresponding parameter in the parameter position and the name of the parameter F1 (1, 2) F1 (1, 2, c=3) F1 (1, 2, 3, ' a ', ' B ') F1 (1, 2, 3, ' a ', ' B ', x=99) F2 (1, 2, d=99, ext=none) # through a tuple and dict, can also call the above function args = (1, 2, 3, 4) kw = {' d ': 99, ' x ': ' # '}f1 (*args, **kw) args = (1,  2, 3) kw = {' d ': 88, ' x ': ' # '}f2 (*args, **kw) # so, for any function, it can be invoked in the form of a Func (*args, **kw), Regardless of how its parameters are defined
Python---function---parameter combination