argparse
is the best library to use to parse command-line arguments in Python. It is included in Python standard libaries (which menas that you can use it out of the box).It is suggestedd that you always log a parsed Namespace object so that you can check whether it is as expected.