The$_{argparse}$module offers a lot more than shown here. Its docs are quite detailed and thorough, and full of examples. Having gone through this tutorial, you should easily digest them without feeling overwhelmed. 7 Conclusion Note that slight difference in the usage text. Note the$_{[-v }$$_{|}$$_{ -q]}$ , which tells us that we can either use$_{-v}$ or$_{-q}$ , but not both at the same time: parser =argparse.ArgumentParser(description="calculate X to the power of Y ") group =parser.add_mutually_exclusive_group() group.add_argument( "-v ","--verbose ", action="store_true") group.add_argument( "-q","--quiet ", action="store_true") parser.add_argument( "x",type=int, help="the base") parser.add_argument( "y",type=int, help="the exponent") args =parser.parse_args() answer =args.x**args.y if args.quiet: print(answer) elif args.verbose: print(" {} to the power {} equals {} ".format(args .x, args .y, answer)) else : print(" {} ^ {} == {} ".format(args .x, args .y, answer)) import argparse $ python3 prog.py --help usage: prog.py [-h] [-v | -q] x y calculate X to the power of Y positional arguments: x the base y the exponent optional arguments: -h, --help show this help message and exit -v, --verbose -q, --quiet 12