Jovian (Netbook) 6 years ago
parent
commit
6966352929
2 changed files with 32 additions and 0 deletions
  1. 17 0
      list_question_arrow.py
  2. 15 0
      list_question_number.py

+ 17 - 0
list_question_arrow.py

@@ -0,0 +1,17 @@
+from PyInquirer import prompt, Separator
+
+widget = [
+	{
+		'type':'list',
+		'name':'lang',
+		'message':'Choose your level :',
+		'choices':['Easy','Medium','Hard',
+		Separator('<For pro gamers only>'),
+		'Harder', 'Harderest', 'Relentless', 'Absurd']
+	}
+]
+
+result = prompt(widget)
+print('Your answer is')
+print(result["lang"])
+

+ 15 - 0
list_question_number.py

@@ -0,0 +1,15 @@
+from PyInquirer import prompt
+
+widget = [
+	{
+		'type':'rawlist',
+		'name':'lang',
+		'message':'Choose your language :',
+		'choices':['Francais','English','Deutsch']
+	}
+]
+
+result = prompt(widget)
+print('Your answer is')
+print(result["lang"])
+