code: def _choose_from_list(options, question):
      
      message = ""
      for index, value in enumerate(options):
          message += "[{}] {}\n".format(index, value)
      message += "\n" + question
  
      def valid(n):
          if int(n) not in range(len(options)):
              raise ValueError("Not a valid option.")
          else:
              return int(n)
  
      prompt(message, validate=valid, key="answer")
      return env.answer
docs: Choose an item from a list.