Below is the example code for argparse in python script.
group = parser.add_mutually_exclusive_group()
group.add_argument('-a','--example-a ', action='store_true', help='--example-a ')
group.add_argument('-b','--example-b' action='store_true', help= '--example-b')
group.add_argument('-c', '--example-c', action='store_true', help= '--example-c')
group.add_argument('-d', '--directory', action='store_true', help= 'to input directory')
Please help me how to add argument if they specify '-d' '--directory' they must input directory path
and if they specify any option like -a, -b, -c with option -d they must specify directory path as input.