标签:pre dict type 参数 list int func print fun
def func(*a):
print(a,type(a))
func(1,2,3,4,5,)
def func1(**a):
print(a,type(a))
func1(k=1,k2=2,k3=3,k4=4,k5=5,)
def func2(*a1,**a):
print(a1,type(a1))
print ( a , type ( a ) )
func2(1,2,3,4,5,k=1,k2=2,k3=3,k4=4,k5=5,)
def func3(q,*a1,**a):
print(q)
print(a1,type(a1))
print ( a , type ( a ) )
func3(1,2,3,4,5,k=1,k2=2,k3=3,k4=4,k5=5,)
list_1=[1,2,3,4]
dict_1={‘k1‘:123,‘k2‘:456}
def func4(*a):
print(a,type(a))
func4(list_1)
func4(*list_1)
func1(**dict_1)
func1()
标签:pre dict type 参数 list int func print fun
原文地址:http://www.cnblogs.com/chengguxian/p/7746938.html