# Dynamic Parameters:
# * 1 star default will pass in the parameters, all placed in the tuple, F1 (*[1 ' 1,22,33,44])
# with 1 stars to handle those values that are passed by default in order
# # #示例
# def func (*args):
# Print (Args,type (args))
# # Execution Mode one
# func (11,33,4,4454,5)
# # Execution Mode two
# li = [11,2,2,3,3,4,54]
# func (*li)
# # Output
# # (one, 4, 4454, 5) <class ' tuple ' >
# # (one, 2, 2, 3, 3, 4, si) <class ' tuple ' >
# #例一
# Dynamic Parameters--Normal pass parameters
# def F1 (*args):
# Print (Args,type (args))
#
# F1 (11,22, "Eric")
# # Output
# (one, one, ' Eric ') <class ' tuple ' >
# #例二
# def F1 (*args): #如果函数定义里面有星号 *,args will have a special function, regardless of the function passed what parameters will be assigned to the args tuple, as the element.
# Print (Args,type (args))
# f1 (11)
# li = [11,22, "Eric"]
# F1 (Li, ' $ ') #传递的参数里面, Li is a tuple, and the value inside the tuple is a list
# # Output
# (one,) <class ' tuple ' >
# ([One, one, ' Eric '], ' <class ') ' tuple ' >
# # Three Examples
# def F1 (*args): #形式参数里面有星号 *, no matter what arguments the function passes, it is assigned to the args tuple as the element.
# Print (Args,type (args))
# li = [11,22, "Eric", ' 33 ',]
# f1 (LI) #不加星号 *, is to insert the entire list as an element into the tuple
# f1 (*li) #加星号 * is to convert every element in the list into the element of the tuple
# # # Note the difference between the two above.
# li = "Alex"
# f1 (*li) #li是一个字符串的情况, there is * equivalent to a For loop inside, the string is inserted into the tuple.
# # Output
# ([One, one, ' Eric ', ' <class '],) ' Tuple ' >
# # (one, one, ' Eric ', ' <class ') ' tuple ' >
# # (' A ', ' l ', ' e ', ' x ') <class ' tuple ' >
Python Road "third": Python Basics (16)--Function Dynamic parameters