list_question_arrow.py 326 B

1234567891011121314151617
  1. from PyInquirer import prompt, Separator
  2. widget = [
  3. {
  4. 'type':'list',
  5. 'name':'lang',
  6. 'message':'Choose your level :',
  7. 'choices':['Easy','Medium','Hard',
  8. Separator('<For pro gamers only>'),
  9. 'Harder', 'Harderest', 'Relentless', 'Absurd']
  10. }
  11. ]
  12. result = prompt(widget)
  13. print('Your answer is')
  14. print(result["lang"])