How to split list and pass them as separate parameter?

后端 未结 4 809
庸人自扰
庸人自扰 2020-12-05 06:52

My problem is I have values in a list. And I want to separate these values and send them as a separate parameter.

My code is:

def egg():
    return          


        
4条回答
  •  余生分开走
    2020-12-05 07:25

    There are maybe better ways, but you can do:

    argList = ["egg1", "egg2"]
    (a, b) = tuple(argList)
    egg2(a, b)
    

提交回复
热议问题