parsing argument in python
问题 I have a problem I am trying to find a solution. I am not sure if I can do it with argparse. I want to be able to specify an option myprog -a 1 myprog -a 2 Now when I have a = 1 , I want to be able to specify b and c . But when a = 2 , I can only specify d . myprog -a 1 -b 3 -c 0 myprog -a 2 -d 3