def f(x, y=1000, *z):
  print('x={} y={} z={}'.format(x,y,z))

f(0)
f(0,1)
f(0,1,2)
f(0,1,2,3)
f(0,1,2,3,4)
f(*[i for i in range(6)])
f(*range(7))

def f(x, y=1000, *z):
  print('x={} y={} z={}'.format(x,y,z))

f(0)                        # x=0, y=1000, z=()
f(0,1)                      # x=0, y=1, z=()
f(0,1,2)                    # x=0, y=1, z=(2,)
f(0,1,2,3)                  # x=0, y=1, z=(2,3)
f(0,1,2,3,4)                # x=0, y=1, z=(2,3,4)
f(*[i for i in range(6)])   # x=0, y=1, z=(2,3,4,5)
f(*range(7))                # x=0, y=1, z=(2,3,4,5,6)

Add explanatory comments to Python varargs script