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
>>> argList = ["egg1", "egg2"] >>> egg2(*argList) egg1 egg2
You can use *args (arguments) and **kwargs (for keyword arguments) when calling a function. Have a look at this blog on how to use it properly.