How to check if only one of the argparse parameters exists

前端 未结 0 1036
天命终不由人
天命终不由人 2021-02-10 11:12

As in the code, there are two parser.add_argument --date and --type. If --type exists, I want to use another function. How can I check the existence of --type? I tried this but

相关标签:
回答
  • 消灭零回复
提交回复
热议问题