Pass tuple to function that takes *args and **kwargs

Viewed 2166

I have two functions:

def foo(*args, **kwargs):
    pass

def foo2():
    return list(), dict()

I want to be able to pass the list and dict from foo2 as args and kwargs in foo, however when I use it like

foo(foo2())

or

foo(*foo2())

tuple returned by foo2 gets assigned to *args. How should I do it properly?

1 Answers
Related