Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

arg parse array argument

parser.add_argument("--list", nargs="+", default=["a", "b"])

SHELL
$ python3 example.py --list a b c
# List would look like ['a','b','c']
Source by www.kite.com #
 
PREVIOUS NEXT
Tagged: #arg #parse #array #argument
ADD COMMENT
Topic
Name
3+1 =