I\'m trying to make an optional argument for a script that can either take no values or 2 values, nothing else. Can you accomplish this using argparse?
# desired
How about the required argument:parser.add_argument("-a", "--action", nargs=2, action="store", help="do some action", required=False)
parser.add_argument("-a", "--action", nargs=2, action="store", help="do some action", required=False)