Remove the nargs=1 part. From: https://docs.python.org/3/library/argparse.html#nargs
nargs=1
Note that nargs=1 produces a list of one item. This is different from the default, in which the item is produced by itself.
2.1m questions
2.1m answers
60 comments
57.0k users