Home / Python Tips Generated By ChatGPT / Using *args and **kwargs for Flexible Function Arguments in Python Accept an arbitrary number of arguments and keyword arguments in functions. Source Code def my_func(*args, **kwargs): print(args) print(kwargs) my_func(1, 2, 3, name="John", age=30)