Way to pass multiple parameters to a function in python

前端 未结 6 1780
遇见更好的自我
遇见更好的自我 2021-02-06 09:12

I have written a python script which calls a function. This function takes 7 list as parameters inside the function, something like this:

def WorkDetails(link, A         


        
6条回答
  •  醉酒成梦
    2021-02-06 09:59

    I think that usage of **kwarg is better. Look this example:

    def MyFunc(**kwargs):
        print kwargs
    
    
    MyFunc(par1=[1],par2=[2],par3=[1,2,3])
    

提交回复
热议问题