Getopts is used to parse the arguments instead of sys.argv. It offers an easier way to set values without the use of multiple positional arguments. It can also make adding new features easier (just add another flag) without breaking previous implementations of the script. Exceptions and error handling is also added.
Getopts is used to parse the arguments instead of sys.argv. It offers an easier way to set values without the use of multiple positional arguments. It can also make adding new features easier (just add another flag) without breaking previous implementations of the script. Exceptions and error handling is also added.