Arguments as flags

Report a typo

Your task is to complete the following code.

Add the --print_answer argument and use the action parameter. The argument's value should be False if the argument is not listed, and True otherwise.

import argparse

parser = argparse.ArgumentParser()
Enter a short text
___

Create a free account to access the full topic