Original address:
Http://www.cnblogs.com/tips4python/archive/2011/05/30/function_with_stay.html
1 def Function_with_one_star (*t):2 print(t, type (t))3 4def function_with_two_stars (* *D)5 Print (d, type (d))
1 Function_with_one_star (1, 2, 3)2 function_with_two_stars (a = 1, b = 2, c = 3)
The results are as follows
(1, 2, 3) <class'tuple'>{'a' 'c'b': 2} <class' Dict'>
Thus, the parameters of the function-descendants with an asterisk (*) parameter are stored as a tuple (tuple);
The parameters of the function descendants with two asterisk (*) parameters are stored as a dictionary (dict), and are
The call is taken in the form of a = 1, b = 2, c = 3.
Since the number of parameters of the descendants is variable, when used with the normal parameters, the parameter with the asterisk must be
The number is put in the last.
"Go" python function parameter with asterisk *