If you would like to print default values of command-line arguments and if you use the argparse.ArgumentParser class in your Python program, consider setting the formatter_class option to argparse.ArgumentDefaultsHelpFormatter.

Example code:

argparser = argparse.ArgumentParser(description=sys.modules[__name__].__doc__,
                                        formatter_class=argparse.ArgumentDefaultsHelpFormatter)
argparser.add_argument('-s', '--std', type=float, default=440.0, help='Standard value')
args = argparser.parse_args()