from invoke import task

@task
def pdf_combine(out_file, in_files):
    print('out = %s' % out_file)
print('in = %s' % in_files)
in_file_list = in_files.split(',')
How to use a variable number of arguments in pyinvoke