Given a function func(*args) and a list, how can I ‘unpack’ the list such that I pass its contents as separate arguments?
I know I can do func(*thelist), but what I actually want to do is pass along another object, besides the contents of the list; something like this func(someobj, *thelist).
How can I do that?
Your code will work exactly as you typed it.
will print: