The following program says hello to the user. It takes one positional argument, the name of the user, and can also be told the greeting.
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('name',
help='name of user'
)
parser.add_argument('-g', '--greeting',
...