I want to pass 2 lists of integers as input to a python program.
For e.g, (from command line)
python test.py --a 1 2 3 4 5 -b 1 2
This worked for me:
parser.add_argument('-i', '--ids', help="A comma separated list IDs", type=lambda x: x.split(','))
EDIT:
I have just realised that this doesn't actually answer the question being asked. Jakub has the correct solution.