I would like to allow a user to enter in multiple ids
as an argument. For example, something like:
import argparse
parser = argparse.ArgumentParser(description='Dedupe assets based on group_id.')
parser.add_argument('--ids', nargs='?', default=None, type=int, help='Enter your ids')
parser.parse_args()
Yet when I enter in something like:
$ python test.py --ids 1 2 3 4
I get the following error:
test.py: error: unrecognized arguments: 2 3 4
What would be the proper way to allow/enter in multiple arguments for a single option?