Home / Python Tips Generated By ChatGPT / Using *args and **kwargs in Python Pass a variable number of arguments to a function. Source Code def foo(*args, **kwargs): print("args:", args) print("kwargs:", kwargs) foo(1, 2, three=3, four=4)