How to use argparse to parse python scripts parameters

In a previous article we have seen how to parse command line arguments using getopts in the context of bash scripts. Now we will see how to accomplish the same task, in a more powerful way, when writing a python script.