[Python] How can we print the argument-list from args and kwargs?

Discussão em 'Python' iniciado por Stack, Setembro 25, 2024.

  1. Stack

    Stack Membro Participativo

    Suppose that we have a variadic function, such as the following:

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


    I would like to edit foo, so that it prints the argument-list. For example, we want the following code...

    foo(98, 99, 100, a = 1, b = 2, c = 3)


    ... to print...

    98, 99, 100, a = 1, b = 2, c = 3

    Continue reading...

Compartilhe esta Página