1

I am creating a program (using Python) that allows users to automatically generate a TXT file with sentences randomly selected from three files (one for each level: A, B, C). The user can select one or more of these three files and the total number of sentences he needs. I tried to use inquirer:

Select the level:

  • A
  • B
  • C

However, it allows to select only one of the options. Is there a way to select both A and B for example?

Andrea
  • 47
  • 5

1 Answers1

1

Old question but I found it when googling, so here's the answer:

inquirer.Checkbox('multiples',
  message="Which modules do you need? (Press <space> to select, Enter when finished).",
  choices=['A', 'B', 'C', 'D', 'E', 'F'])

HTH someone else in the same situation.

Documentation: https://python-inquirer.readthedocs.io/en/latest/usage.html

ac_
  • 1,147
  • 4
  • 13
  • 34