I am writing some code that receives functions with variable numbers of arguments. I also have lists of those arguments (but the functions expect separate arguments, not one list). Is there a way to convert this list into arguments of a form that the functions might like (and sadly, they cannot just be converted to strings)?
I am writing some code that receives functions with variable numbers of arguments. I
Share
Yes, just prefix the list with a
*to unpack it:More details available at the Python tutorial.