+ 2

Trying to get user input from a list?

have a list trying to create a program that takes user input if value is in the list.

27th Nov 2017, 6:13 AM
Jaymes Johnson
Jaymes Johnson - avatar
1 Antwort
+ 3
value = "something" alist = ["nothing", "maybe", "something"] if value in alist: userIn = input("Enter something: ")
27th Nov 2017, 6:43 AM
Sapphire