After declaring a mutually exclusive group, how are these value accessed. If the user specifies --predict, only 4 values should be allowed and once they are attached, how are they accessed? Here is my code that is not allowing me to access the list of attached numbers:
parser = argparse.ArgumentParser(description='Video game preferences: train or predict mode.')
group = parser.add_mutually_exclusive_group(required=True)
group.add_argument('--train', action='store', help='')
group.add_argument('--predict', nargs=4, type=float, action='store', help=''represented by 1s)')
arg = parser.parse_args()
print(arg)
And here is how I am calling the program from cmd:
main.py --predict 1 8 7 6