python argparse const default 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: python argparser flags
parser.add_argument("-v", "--verbose", action="store_true",
help="verbose output")