python argparse list of lists of str choices code example
Example 1: argparse accept only few options
...
parser.add_argument('--val',
choices=['a', 'b', 'c'],
help='Special testing value')
args = parser.parse_args(sys.argv[1:])
Example 2: parser.add_argument array python
parser.add_argument('-l','--list', nargs='+', help=' Set flag', required=True)
# Use like:
# python arg.py -l 1234 2345 3456 4567