How to split list and pass them as separate parameter?

>>> 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.

Leave a Comment