1 >>> l1=[1,2,3] 2 >>> def func(x,y,z): 3 print(x,y,z) 4 5 >>> func(*l1)#星号可以将列表元素分解传入函数参数 6 1 2 3
调用同事,传入*是为了分解,定义时传入*是为了整合
定义时传入的*输出时是元祖。