Can I use argparse to read named command line arguments that do not need to be in a specific order? I browsed through the documentation but most of it focused on displaying content based on the arguments provided (such as --h).
Right now, my script reads ordered, unnamed arguments:
myscript.py foo-val bar-val
using sys.argv:
foo = sys.argv[1]
bar = sys.argv[2]But I would like to change the input so that it is order agnostic by naming arguments:
myscript.py --bar=bar-val --foo=foo-val