Python - Argparse - Choices


Choices example:

# Allow only select options for arguments
parser.add_argument('--animal', choices=['dog', 'cat', 'giraffe'])