How do I suppress an argument when nothing is input on command line?
How do I suppress an argument when nothing is input on command line? Question: #!/usr/bin/env python3 import argparse parser = argparse.ArgumentParser() parser.add_argument(‘–selection’, ‘-s’) parser.add_argument(‘–choice’, ‘-c’, default = argparse.SUPPRESS) args = parser.parse_args() def main(selection, choice): print(selection) print(choice) if __name__==’__main__’: main(args.selection, args.choice) The example provided is just to provide something simple and short that accurately articulates the …