def func(*args, **kwargs):
    ...

字典解包混用:

def example(a, b, c, d):
    print(a, b, c, d)
 
params = {"b": 2, "c": 3}
example(1, **params, d=4)
# 输出:1 2 3 4