代码
提交代码
def add(*args): sum = 0 for arg in args: sum = sum + arg print('len = %d, sum = %d' % (len(args), sum)) add(1) add(1, 2) add(1, 2, 3)
运行结果